Jump to content

Excecute DOS Command in Run


Recommended Posts

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.

Link to comment
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
Link to comment
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"')

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