#184749 - 2008-01-22 07:55 PM
How to disable Logon Scripts for Citrix Logons
|
Mephy
Fresh Scripter
Registered: 2008-01-22
Posts: 18
|
Ok, I would like to modify my CMD file that calls my KiX logon to NOT run the Logon Script when a user is logging on VIA Citrix. I know Les posted something on this, but I'm not totally sure about it, and I also can't seem to find it again!!!
Any help would be greatly appreciated!
|
Top
|
|
|
|
#184753 - 2008-01-22 08:05 PM
Re: How to disable Logon Scripts for Citrix Logons
[Re: Les]
|
Mephy
Fresh Scripter
Registered: 2008-01-22
Posts: 18
|
That's what I want Les. I want it in my CMD so KiX doesn't load at all. So, on your code, I would put it EXACTLY how you put it, but where CitrixSvrDomain is, I would put the Citrix server name?
|
Top
|
|
|
|
#184767 - 2008-01-22 11:00 PM
Re: How to disable Logon Scripts for Citrix Logons
[Re: Mart]
|
Mephy
Fresh Scripter
Registered: 2008-01-22
Posts: 18
|
Yes, we use a CMD file to launch our KiX Script. I have no control over changing that at this moment, so I need to modify the CMD file to check if they are logging on through Citrix, and if they are, do NOT run the wkix32.exe line at all. Unless there is an easier way to build this check into the KiX script and go from there, doesn't really matter to me as long as it's easy, and works. =) Thanks for the helps guys!
|
Top
|
|
|
|
#184797 - 2008-01-23 04:21 PM
Re: How to disable Logon Scripts for Citrix Logons
[Re: Les]
|
Mephy
Fresh Scripter
Registered: 2008-01-22
Posts: 18
|
Ok, so by using this code:
; Exit immediatly if IsCitrix is not null
If '%IsCitrix' Quit 0 EndIf
If I put that at the VERY beginning of my KiX script, it will check to see if IsCitrix exists, if it does, the Script is ended, right then and there, before going any further, and if it does NOT exist, the script continues to run normally. Correct?
Ok, one last question, this IsCitrix, is this a Reg Key or what?
|
Top
|
|
|
|
#184798 - 2008-01-23 04:36 PM
Re: How to disable Logon Scripts for Citrix Logons
[Re: Mephy]
|
Glenn Barnas
KiX Supporter
   
Registered: 2003-01-28
Posts: 4400
Loc: New Jersey
|
It's an environment var - which is easy to define and check. You could use a reg key if you wish - same concept, different commands.
If you use the environment var, you log onto the Citrix server as an admin, right-click My Computer, choose Properties. On the Advanced Tab, click the Environment Variables button. In the "System Variables" section, click New, enter "IsCitrix" in the Variable Name field, and "1", "yes", "true", or even the server name in the Variable Value field - anything so long as it isn't blank.
Open a command prompt, type "SET" and verify that the variable IsCitrix is present. You must open the command prompt after the change to see it.
If the variable is blank, or not defined, your script runs, if it is defined AND NOT blank, it exits.
Glenn
_________________________
Actually I am a Rocket Scientist!
|
Top
|
|
|
|
#184799 - 2008-01-23 04:43 PM
Re: How to disable Logon Scripts for Citrix Logons
[Re: Glenn Barnas]
|
Mephy
Fresh Scripter
Registered: 2008-01-22
Posts: 18
|
Sounds good. Thanks for all the help guys, if I have any more issues, I'll be back. =), but really, thanks for all the help!
|
Top
|
|
|
|
#184813 - 2008-01-24 03:56 PM
Re: How to disable Logon Scripts for Citrix Logons
[Re: Mephy]
|
Mephy
Fresh Scripter
Registered: 2008-01-22
Posts: 18
|
OK, maybe I'm doing it wrong, but I put this code in:
; Exit immediatly if Citrix is not null
If '%Citrix' Quit 0 EndIf
Our variable is labeled Citrix..... now, when I run the script locally, it's not running the script past the Citrix part..... I checked my local variables and Citrix does not exist... I even tested it by logging on through the network with the script in place, and it didn't work... am I missing something??
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 581 anonymous users online.
|
|
|