Jump to content
Sign in to follow this  
echol

Script error - Quote

Recommended Posts

echol

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 ??

Share this post


Link to post
Share on other sites
TK_Incorperate

ok this really isnt any of my buisness but just a question... why are you binding a run command? sorry it just doesnt make sense to me

Share this post


Link to post
Share on other sites
echol

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()

Share this post


Link to post
Share on other sites
MHz

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

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

Share this post


Link to post
Share on other sites
echol

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.

Share this post


Link to post
Share on other sites
MHz

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.

Share this post


Link to post
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
Sign in to follow this  

×