Sign in to follow this  
Followers 0
misterc9

Excecute DOS Command in Run

3 posts in this topic

Hello,

I am having a problem getting the right syntax for the following command to be executed in the Run

The command below will execute the uninstall program in DOS but I want to be able to do this in AutoIT.

C:\WINDOWS\IsUninst.exe -f"C:\Program Files\Novell\ZENworks\Asset Management\UninstFA.isu" -c"C:\Program Files\Novell\ZENworks\Asset Management\bin\UninstCC.dll"

Some syntax I have tried

RunWait("IsUninst.exe -f""C:\Program Files\Novell\ZENworks\Asset Management\UninstFA.isu" -c"C:\Program Files\Novell\ZENworks\Asset Management\bin\UninstCC.dll")

RunWait(@ComSpec & " /c" & "IsUninst.exe -f""C:\Program Files\Novell\ZENworks\Asset Management\UninstFA.isu" -c"C:\Program Files\Novell\ZENworks\Asset Management\bin\UninstCC.dll")

I either get Unterminated String or Missing Separator Charactor, help!! Thank you.

Share this post


Link to post
Share on other sites



Try it this way (just putting single quotes around the whole string):

$sExtDir = 'C:\Program Files\Novell\ZENworks\Asset Management'
$sExtCmd = 'C:\WINDOWS\IsUninst.exe -f"C:\Program Files\Novell\ZENworks\Asset Management\UninstFA.isu" -c"C:\Program Files\Novell\ZENworks\Asset Management\bin\UninstCC.dll"'
RunWait($sExtCmd, $sExtDir)

Note the use of the original full path to the executable.

:mellow:


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

Yes that did the trick. I also went back and added the single ticks in the beginning and end of the syntax and that also worked, didn't know about the single tick, thanks again.

RunWait('IsUninst.exe -f"C:\Program Files\Novell\ZENworks\Asset Management\UninstFA.isu" -c"C:\Program Files\Novell\ZENworks\Asset Management\bin\UninstCC.dll"')

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  
Followers 0