Page 1 of 1 1
Topic Options
#111854 - 2004-01-15 04:20 PM script not skipping, help please?
Chrispybee Offline
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 Offline
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
#111856 - 2004-01-15 04:29 PM Re: script not skipping, help please?
Les Offline
KiX Master
*****

Registered: 2001-06-11
Posts: 12734
Loc: fortfrances.on.ca
CALL is to execute a separate script. It is not a GOTO which by the way you should not use either. THere are lots of good ideas on how to subvert scripts on Citrix serves in our FAQ section.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.

Top
#111857 - 2004-01-15 04:45 PM Re: script not skipping, help please?
Chrispybee Offline
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 Offline
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
_________________________
Utilize these resources:
UDFs (Full List)
KiXtart FAQ & How to's

Top
#111859 - 2004-01-16 02:57 PM Re: script not skipping, help please?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
Unless there's a 'ChCitrixF' computer that is supposed to be included. ;-)
_________________________
There are two types of vessels, submarines and targets.

Top
#111860 - 2004-01-27 05:28 PM Re: script not skipping, help please?
Chrispybee Offline
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
#111861 - 2004-01-27 05:52 PM Re: script not skipping, help please?
Sealeopard Offline
KiX Master
*****

Registered: 2001-04-25
Posts: 11165
Loc: Boston, MA, USA
This will not work on multiple grounds as the IF is never being reached due to the RETURN ahead of it. The use of GUSUB requires RETURNS to terminate subroutines. It is also used as a GOTO instead of a GOSUB and completely unneccessary. Please make yourself familiar with IF-ENDIF and SELECT-CASe-ENDSELECt as explained int he KiXtart Manual.
_________________________
There are two types of vessels, submarines and targets.

Top
#111862 - 2004-01-27 11:13 PM Re: script not skipping, help please?
ShaneEP Moderator Offline
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
Page 1 of 1 1


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

Who's Online
0 registered and 1003 anonymous users online.
Newest Members
StuTheCoder, M_Moore, BeeEm, min_seow, Audio
17884 Registered Users

Generated in 0.056 seconds in which 0.023 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