shuanpicto
Programmer
I am creating a script to import and export user settings into mandatory profiles at logon and logoff.
The problem occurs when a user logs onto a citrix server, it runs the script, and messes up the settings.
I need to capture the computer name, set the citrix server in a variable, and do an If statement that only runs the required code, if the user IS NOT logging onto the citrix server.
This is what I have
Set wshshell = CreateObject("WScript.Shell")
Set ObjEnv = WshShell.Environment("Process")
COMPUTERNAME = ObjEnv("COMPUTERNAME")
citrixserver = "citrixserver"
If COMPUTERNAME="citrixserver" Then
' Do Nothing
Else
' Do this
wshshell.Run "REGEDIT /s " & Chr(34) & APPDATA & "\Temp\Wallpaper.reg" & Chr(34), 1, Wait
End IF
Any help would be greatly appreciated.
The problem occurs when a user logs onto a citrix server, it runs the script, and messes up the settings.
I need to capture the computer name, set the citrix server in a variable, and do an If statement that only runs the required code, if the user IS NOT logging onto the citrix server.
This is what I have
Set wshshell = CreateObject("WScript.Shell")
Set ObjEnv = WshShell.Environment("Process")
COMPUTERNAME = ObjEnv("COMPUTERNAME")
citrixserver = "citrixserver"
If COMPUTERNAME="citrixserver" Then
' Do Nothing
Else
' Do this
wshshell.Run "REGEDIT /s " & Chr(34) & APPDATA & "\Temp\Wallpaper.reg" & Chr(34), 1, Wait
End IF
Any help would be greatly appreciated.