Page 1 of 1 1
Topic Options
#138286 - 2005-04-20 06:31 PM Syntax error in script...
pat_smith1969 Offline
Fresh Scripter

Registered: 2005-04-19
Posts: 18
Here is my code
Code:
  Break On 
if not InContainer('OU=Servers,OU=Machines,DC=TIGR,DC=ORG', 'Computer')[0]
If Not Incontainer('OU=Domain Controllers,DC=TIGR,DC=ORG', 'Computer')[0]
If @WKSTA <> "psmith02-xp"
IF NOT exist c:\Windows\sytem32\aexswdinstsvc.exe
copy \\Altiris\x86\aexswdinstsvc.exe c:\Windows\system32
EndIF
if NOT exist c:\Windows\system32\aexnsc.log
c:\Windows\system32\aexswdinstsvc.exe -u “http://Altiris/Altiris/nscap/bin/win32/x86/ns

client package/aexnsc.exe” -s Altiris.TIGR.ORG -w http://Altiris/Altiris
EndIF
endif



[The funcition code for the "Translatename" and "Incontainer" is later in the script and has been tested to be working, that is not the issue]

When run I get the following error...
Quote:

Script error : invalid method/function call: missing '(' !
IF NOT Exist c:\WIndows\system32\aexswdistsvc.exe




As far as I can tell it does not understand the "not exist" function... any ideas?

Top
#138287 - 2005-04-20 06:33 PM Re: Syntax error in script...
Bryce Offline
KiX Supporter
*****

Registered: 2000-02-29
Posts: 3167
Loc: Houston TX
Code:

Exist( )

Action: Checks for the existence of one or more files.

Syntax: Exist ("file name")

Parameters: File name
Identifies the file(s) you want to locate.

Remarks: Supports wildcards.

Returns: 0
File not found

1
File found



Examples: IF EXIST (@LDRIVE + "\users.txt")
DISPLAY @LDRIVE + "\users.txt"
ENDIF

IF EXIST (@LDRIVE + "\*.INI")
; Etc, etc.
ENDIF



Top
#138288 - 2005-04-20 06:40 PM Re: Syntax error in script...
pat_smith1969 Offline
Fresh Scripter

Registered: 2005-04-19
Posts: 18
The part where I state

if NOT exist(c:\Windows\system32\aexnsc.log)
c:\Windows\system32\aexswdinstsvc.exe -u “http://Altiris/Altiris/nscap/bin/win32/x86/ns

client package/aexnsc.exe” -s Altiris.TIGR.ORG -w http://Altiris/Altiris

Does not work either... It does not get that it is supposed to execute c:\aexswdistsvc.exe with a bunch of parameters... I tried to use the shell command but that didnt work either.

Top
#138289 - 2005-04-20 06:48 PM Re: Syntax error in script...
Radimus Moderator Offline
Moderator
*****

Registered: 2000-01-06
Posts: 5187
Loc: Tampa, FL
shell 'c:\Windows\system32\aexswdinstsvc.exe -u “http://Altiris/Altiris/nscap/bin/win32/x86/ns client package/aexnsc.exe” -s Altiris.TIGR.ORG -w http://Altiris/Altiris'
_________________________
How to ask questions the smart way <-----------> Before you ask

Top
#138290 - 2005-04-20 06:53 PM Re: Syntax error in script...
pat_smith1969 Offline
Fresh Scripter

Registered: 2005-04-19
Posts: 18
Thanks guys ... this worked perfect.
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 2870 anonymous users online.
Newest Members
fgarcia, Viginette, ManuvdWielNL, Sir_Barrington, batdk82
17889 Registered Users

Generated in 0.052 seconds in which 0.026 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