Jump to content

Using Autoit to create a batch File to run an executable


Recommended Posts

  • Moderators

The way you have it in your last post is the way it should look. Have you tried it?

As for syntax, you really need to crack open the help file and look...

Edited by JLogan3o13

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

Local $strCmd = @ScriptDir & "\Setup.exe"
; RunAsWait("Administrator", "MyDomain", "MyPassword", $RUN_LOGON_NETWORK, $strCmd) ; Line temporary disabled.
ConsoleWrite ($strCmd & @CRLF)

First make sure the command actually runs. Copy the ConsoleWrite output from the script above and paste it into the Windows Run Box ( Windows Key + R) If the command does not run put quotes around it. Something like this:  "c:\My Temp Dir\Setup.exe". Experiment till your'e command runs Ok from the Windows Run Box. After that adjust the AutoIT script to the correct path and run it again. If you need Quotes look for something like this: Local $strCmd = Chr (34) & "C:\My Temp Dir\Setup.exe" & Chr (34)

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