Page 1 of 1 1
Topic Options
#167573 - 2006-09-13 05:28 PM Need Help Running a command in login script.
Kirk Offline
Lurker

Registered: 2006-09-13
Posts: 4
I need to execute a coomand which will connect users to our R3000 proxy server. It requires that you execute this command and pass some parameters. I have used the run command which works to call the .exe. However the parameter string I just cannot get working. Here is my script, the command is the bold section. Any help would be apperciated!

;Greentree Citrix Farm Default Logon Script
;Updated 4-6-2006 Kirk M, added St. Paul Citrix Users.


;Skip script for Domain Admins
;IF INGROUP("Domain Admins")
; GOTO DONE
;ENDIF

RUN \\rcfas2\rcdept\R3000\Authenticat.exe RA[10.200.232.18] /quiet /passive /norestart",0,True
IF INGROUP("CITRIX MHD DESKTOP")
Use G: "\\tpnas1\mhdept\dept" /persistent:no
Use U: "\\tpnas1\mhusers\Users\%username%" /persistent:no

ENDIF

IF INGROUP("SP_CTX_Users")
Use G: "\\spnas2\spdept\DEPT" /persistent:no
Use U: "\\spnas1\spusers\Users\%username%" /persistent:no

ENDIF

;Variables for registry changes
$HKCUIE="HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main"
$HKCUSHELL="HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders"
$WINDIR="U:\Windows"

;Registry changes
WriteValue( $HKCUIE, "Enable AutoImageResize", "yes", "REG_SZ")
WriteValue( $HKCUIE, "AllowWindowReuse", "off", "REG_DWORD")
WriteValue( $HKCUIE, "Start Page", "http://home.gtservicing.com", "REG_SZ")
WriteValue( "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Cache", "Persistent", "0", "REG_DWORD" )
WriteValue( "HKEY_CURRENT_USER\Printers\Settings", "EnableBalloonNotificationsLocal", "0", "REG_DWORD" )
WriteValue( "HKEY_CURRENT_USER\Printers\Settings", "EnableBalloonNotificationsRemote", "0", "REG_DWORD" )
WriteValue( "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer", "BrowseNewProcess", "yes", "REG_SZ" )
WriteValue( $HKCUSHEL, "AppData", "%USERPROFILE%\Application Data", "REG_SZ")
if existkey( $HKCUSHELL ) = "0"
if writevalue( $HKCUSHELL , "Favorites" , $WINDIR + "\Favorites" , "REG_SZ" )
and writevalue( $HKCUSHELL , "Personal" , $WINDIR + "\Personal" , "REG_SZ" )
and writevalue( $HKCUSHELL , "My Documents" , $WINDIR + "\My Documents" , "REG_SZ" )
and writevalue( $HKCUSHELL , "Cookies" , $WINDIR + "\Cookies" , "REG_SZ" )
and writevalue( $HKCUSHELL , "My Pictures" , $WINDIR + "\Personal\My Pictures" , "REG_SZ" )
and writevalue( $HKCUSHELL , "Recent" , $WINDIR + "\Recent" , "REG_SZ" )
and writevalue( $HKCUSHELL , "History" , $WINDIR + "\History" , "REG_SZ" )
and writevalue( $HKCUSHELL , "Templates" , $WINDIR + "\Templates" , "REG_SZ" )
; Success
else
; Failure
endif
endif

IF NOT EXIST (u:\)
GOTO NOUDRV
ENDIF
IF NOT EXIST (u:\notes\)
COPY "\\tpnas1\mhusers\BASE_Citrix_User_Folders\Notes\" u:\Notes\ /c /h /r /s
COPY "\\tpnas1\mhusers\BASE_Citrix_User_Folders\Favorites\" u:\windows\favorites\ /c /h /r /s
ENDIF
IF NOT EXIST (u:\Windows\notes.ini)
COPY "\\tpnas1\mhusers\BASE_Citrix_User_Folders\notes.ini" u:\Windows\notes.ini
ENDIF

:NOUDRV

ONE

Top
#167574 - 2006-09-13 05:36 PM Re: Need Help Running a command in login script.
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
RUN '\\rcfas2\rcdept\R3000\Authenticat.exe RA[10.200.232.18] /quiet /passive /norestart,0,True '
Top
#167575 - 2006-09-13 06:08 PM Re: Need Help Running a command in login script.
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
Quote:


Use G: "\\tpnas1\mhdept\dept" /persistent:no




I don't think in the user manual is written that for the "Use" command, the "/persistent" switch supports a ":no"

Top
#167576 - 2006-09-13 06:14 PM Re: Need Help Running a command in login script.
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
You may want to get rid of these nasty goto's
Code:

If Exist (u:\)
If NOT Exist (u:\notes\)
Copy "\\tpnas1\mhusers\BASE_Citrix_User_Folders\Notes\" u:\Notes\ /c /h /r /s
Copy "\\tpnas1\mhusers\BASE_Citrix_User_Folders\Favorites\" u:\windows\favorites\ /c /h /r /s
EndIf
If NOT Exist (u:\Windows\notes.ini)
Copy "\\tpnas1\mhusers\BASE_Citrix_User_Folders\notes.ini" u:\Windows\notes.ini
EndIf
EndIf


Top
#167577 - 2006-09-13 06:16 PM Re: Need Help Running a command in login script.
Witto Offline
MM club member
*****

Registered: 2004-09-29
Posts: 1828
Loc: Belgium
and also
Code:

If NOT InGroup("Domain Admins")
; Your code here
EndIf


Top
Page 1 of 1 1


Moderator:  Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart 
Hop to:
Shout Box

Who's Online
0 registered and 2220 anonymous users online.
Newest Members
Viginette, ManuvdWielNL, Sir_Barrington, batdk82, StuTheCoder
17888 Registered Users

Generated in 0.161 seconds in which 0.124 seconds were spent on a total of 12 queries. Zlib compression enabled.

Search the board with:
superb Board Search
or try with google:
Google
Web kixtart.org