|
|
|||||||
Collective, I need to test for two conditions. First, if script see's a server, and is not Citrix (by name) then abort. I have 2 variables: IsServer = Yes @Wksta = Citrix I want to abort the script if IsServer = Yes, unless the @Wksta = Citrix. Perhaps I'm too tired now, but I can't get this to work. Hints / suggestions are completely welcome. Thanks John |
||||||||
|
|
|||||||
if $IsServer and not instr(@wksta,'Citrix') ;IsServer is in this case anything but empty or 0 ! quit endif assimilate this [ 04. March 2003, 09:27: Message edited by: jpols ] |
||||||||
|
|
|||||||
Write it as you'd say it... code:If $IsServer="Yes" AND @WKSTA <> "Citrix" |
||||||||
|
|
|||||||
Jochen, it looks like I'm doomed to follow you around the board this morning Must get a cup of coffee... |
||||||||
|
|
|||||||
Yeah , got already my 4th |
||||||||
|
|
|||||||
Hi Jtrainer... I'm not at work to really test this, but something like this should work. As someone else comes online they may show you other code using the other macros of KiXtart 4.x The use of the NOT operator requires you to be using KiXtart v4.x, but can be recoded if you're using v3.6x $SRVR = ReadValue("HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\ProductOptions", "ProductType") IF $SRVR<>"WinNT" AND @Wksta NOT = "Citrix" QUIT ENDIF |
||||||||
|
|
|||||||
Good point Ron ! ALWAYS tend to forget that some people might still use 3.x |
||||||||
|
|
|||||||
Dang... clicked on MSN then came back and you guys jumped in line. Hmmm.. I'm not a STARTERS Mod, so I can't boot your stuff. Oh well... |
||||||||
|
|
|||||||
All, thanks. As I said, I was pretty tired. I had the line working, yet as tired as I was, I forgot to replicate the updated code to the netlogon share. So as you may imagine it failed. Yes I'm using 4.x, so I know it works with the NOT operator. The code I had is the same as what Richard used. Again thanks. BTW, did you know a rouge Exit aborts a script? He He I knew I was too tired to script a logon change last night. |
||||||||
|
|
|||||||
yap, if stated at topmost level EXIT exits the script |
||||||||
|
|
|||||||
quote:Yeah? I suggest you use the dusky umber Exit, it doesn't suffer from this problem. |
||||||||
|
|
|||||||
Dusky Umber? Is that Maybelline or Max Factor? Can't seem to find it here in the makeup drawer... Maybe it's a rogue color? G. |
||||||||
|
|
|||||||
Dusky Umber, Isn't he the cousin of the Max Factor heir that was convicted of raping all those girls with the date rape drugs? |