#76095 - 2003-07-28 01:39 PM
Strange GOTO Error
|
nboothe
Lurker
Registered: 2001-11-07
Posts: 4
|
I'm getting an unknow command [BEGIN] error in my script and I can't figure out why. I've used this same command in the script numerous time and it has never given an error before. Here is an excerpt from the script.
code:
; UPDATES THE CLIENT REGISTRY BASED ON THE VALUE OF $OS
SELECT CASE ($OS = "Windows XP") GOTO "winxp" CASE ($OS = "Windows 98") GOTO "win9x" CASE ($OS = "Windows 95") GOTO "win9x" CASE ($OS = "Windows 2000") GOTO "begin" CASE ($OS = "Windows NT") GOTO "begin" CASE ($OS = "Windows ME") GOTO "begin" CASE ($OS = "Unknown OS") GOTO "begin" ENDSELECT
:winxp
SHELL "regedit -s w:\regfiles\proxywxp.reg
IF EXIST(c:\windows\system32\dsfolder.dll) GOTO "BEGIN" ELSE ENDIF
COPY "w:\scriptfiles\dsfolder.dll" "c:\windows\system32" SHELL "regsvr32 dsfolder.dll /s" GOTO "BEGIN" END
:win9x
SHELL "regedit -s w:\regfiles\proxyw9x.reg" GOTO "BEGIN" END
;-----------------------------------------------------------------------------
:BEGIN
; DECLARES THE VARIABLE $CL AS THE NAME OF THE CLIENTS WORKSTATION. LOOKS AT ; THE FIRST THREE CHARACTERS OF THE WORKSTATION NAME AND JUMPS TO SECTION OF THE ; SCRIPT ASSOCIATED WITH THE SPECIFIC SITE. IF NO MATCH IS FOUND IT JUMPS TO :W9X
$cl = "@wksta"
The exact section that gives me the problem is:
code:
IF EXIST(c:\windows\system32\dsfolder.dll) GOTO "BEGIN" ELSE ENDIF
Any help would be appreciated!
Thanks.
|
|
Top
|
|
|
|
#76098 - 2003-07-28 01:52 PM
Re: Strange GOTO Error
|
nboothe
Lurker
Registered: 2001-11-07
Posts: 4
|
Thanks for reply. I added the single quotes but still get the same error. Any other ideas?
Thanks.
|
|
Top
|
|
|
|
#76100 - 2003-07-28 02:11 PM
Re: Strange GOTO Error
|
Chris S.
MM club member
   
Registered: 2002-03-18
Posts: 2368
Loc: Earth
|
I wasn't aware that END was a command in the KiXtart manual.
|
|
Top
|
|
|
|
#76101 - 2003-07-28 02:15 PM
Re: Strange GOTO Error
|
nboothe
Lurker
Registered: 2001-11-07
Posts: 4
|
Jochen, you are the man! I looked a that stupid script over and over again. I knew it was something simple.
|
|
Top
|
|
|
|
Moderator: Glenn Barnas, NTDOC, Arend_, Jochen, Radimus, Allen, ShaneEP, Ruud van Velsen, Mart
|
0 registered
and 1343 anonymous users online.
|
|
|