Jump to content

Script error - Quote


echol
 Share

Recommended Posts

Hi all,

I need advise, I got error " Unable to execute the external program" when run my script.

below the error line

$PID = Run("C:\Temp\Altiris\AeXNSC.exe -s -a ns= "snap.basf-apc.co.id" NOSTARTMENU /s")

does anybody know why ??

Link to comment
Share on other sites

Hi all,

I need advise, I got error " Unable to execute the external program" when run my script.

below the error line

$PID = Run("C:\Temp\Altiris\AeXNSC.exe -s -a ns= "snap.basf-apc.co.id" NOSTARTMENU /s")

does anybody know why ??

b'cause the program need to be hardcode ns=snap.basf-apc.co.id

below my complete script

RunAsSet("Administrator", @Computername, "xxxxx")

SplashTextOn("Windows Installer", "Installing program" & @CR & "Please wait .....(approx. 2 min)" & @CR & @CR & "IS Department", -1, 200, -1, -1, 0, "Tahoma", 22)

if FileExists("C:\Program Files\Altiris\Altiris Agent\AeXSWDUsrUIWin.exe") then

else

FileCopy("Z:\DRIVER\patch\AeXNSC.exe", "C:\WINNT\Temp")

$PID = Run("C:\Temp\Altiris\AeXNSC.exe -s -a ns= ""snap.basf-apc.co.id"" NOSTARTMENU /s")

ProcessWaitClose($PID)

endif

SplashOff()

RunAsSet()

Link to comment
Share on other sites

The quotes are different to the 1st post. Is that working for you now ?

Yup, it's different I tried using double qoute, but still doesn't work. What command should I use, so Autoit will read this snap.basf-apc.co.id as a text.

Link to comment
Share on other sites

I would suggest this:

$PID = Run('"C:\Temp\Altiris\AeXNSC.exe" -s -a ns= "snap.basf-apc.co.id" NOSTARTMENU /s')

I have wrapped the whole command used in single quotes to make double quotes easy to manage.

This looks like an installer. Some installers, like NSIS for example, do not like quotes used. The NSIS /D= switch can fail when the path used behind the /D= is wrapped in quotes. NSIS seems to read the whole commandline raw so no problems with spaces. Just a note.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...