#111854 - 2004-01-15 04:20 PM
script not skipping, help please?
|
Chrispybee
Fresh Scripter
Registered: 2004-01-12
Posts: 21
|
Hi guys, I've written a script that calls NoUpdate but still runs if on the below workstations. is wksta case sensing?
IF @WKSTA="ChCitrixDS" or @WKSTA="ChCitrixA" or @WKSTA="ChCitrixB" or @WKSTA="ChCitrixC" or @WKSTA="ChCitrixD" or @WKSTA="ChCitrixE" call NoUpdate ENDIF IF INGROUP ("GN3_Users") run "\\gn3cluster\gn3\globals\gn_progs\update32.exe c:\tera\bin \\gn3cluster\gn3\globals" ENDIF :NoUpdate
Thanks
|
|
Top
|
|
|
|
#111855 - 2004-01-15 04:28 PM
Re: script not skipping, help please?
|
Sealeopard
KiX Master
   
Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
|
You might want to read in the KiXtart Manual what CALL does.
What you want to do is rather
Code:
$exclude='ChCitrixDS','ChCitrixA','ChCitrixB','ChCitrixC','ChCitrixD','ChCitrixE','ChCitrixDS','ChCitrixA','ChCitrixB','ChCitrixC','ChCitrixD','ChCitrixE'
if ascan($exclude,@WKSTA)=-1
IF INGROUP('GN3_Users')
run '\\gn3cluster\gn3\globals\gn_progs\update32.exe c:\tera\bin \\gn3cluster\gn3\globals'
ENDIF
endif
Edited by sealeopard (2004-01-15 04:32 PM)
_________________________
There are two types of vessels, submarines and targets.
|
|
Top
|
|
|
|
#111857 - 2004-01-15 04:45 PM
Re: script not skipping, help please?
|
Chrispybee
Fresh Scripter
Registered: 2004-01-12
Posts: 21
|
Cheers fellas, nice one.
|
|
Top
|
|
|
|
#111858 - 2004-01-16 04:31 AM
Re: script not skipping, help please?
|
Kdyer
KiX Supporter
   
Registered: 2001-01-03
Posts: 6241
Loc: Tigard, OR
|
Be careful with CALL.. CALL is used to CALL another KiXTart Script.
You can distill this down even further.. No need to list 12 Citrix Servers.  Code:
SELECT CASE INSTR(@WKSTA,"ChCitrix") RETURN CASE INGROUP ("GN3_Users") run "\\gn3cluster\gn3\globals\gn_progs\update32.exe c:\tera\bin \\gn3cluster\gn3\globals" ENDSELECT
HTH,
Kent
|
|
Top
|
|
|
|
#111860 - 2004-01-27 05:28 PM
Re: script not skipping, help please?
|
Chrispybee
Fresh Scripter
Registered: 2004-01-12
Posts: 21
|
I'm trying to get to grips with this scripting thingy, could this work??
SELECT CASE INSTR(@WKSTA,"ChCitrix") RETURN if instr(@WKSTA,"chcitrixf") gosub NoUpdate end if CASE INGROUP ("GN3_Users") run "\\gn3cluster\gn3\globals\gn_progs\update32.exe c:\tera\bin \\gn3cluster\gn3\globals" ENDSELECT
:NoUpdate
Ta
|
|
Top
|
|
|
|
#111862 - 2004-01-27 11:13 PM
Re: script not skipping, help please?
|
ShaneEP
MM club member
   
Registered: 2002-11-29
Posts: 2127
Loc: Tulsa, OK
|
Im kind of confused on what it is you are even trying to accomplish? Do you want to run the .exe on the citrix machines or on anything besides the citrix machines?
The below code will run the .exe if the machine is not one of the listed and if the user is in the GN3_Users group.
Code:
If @WkSta<>"ChCitrixDS" and @WkSta<>"ChCitrixA" and @WkSta<>"ChCitrixB" and @WkSta<>"ChCitrixC" and @WkSta<>"ChCitrixD" and @WkSta<>"ChCitrixE" If InGroup ("GN3_Users") Run "\\gn3cluster\gn3\globals\gn_progs\update32.exe c:\tera\bin \\gn3cluster\gn3\globals" Endif Endif
|
|
Top
|
|
|
|
Moderator: Jochen, Allen, Radimus, Glenn Barnas, ShaneEP, Ruud van Velsen, Arend_, Mart
|
0 registered
and 1003 anonymous users online.
|
|
|