I created an AutoIt script to install my executable. But when I run it, nothing is executed. My script:
Run("agent.exe", "C:\temp")
After saving and compiling (using Ctrl + F7), nothing is executed. Why?
I created an AutoIt script to install my executable. But when I run it, nothing is executed. My script:
Run("agent.exe", "C:\temp")
After saving and compiling (using Ctrl + F7), nothing is executed. Why?
Try this:
Run("C:\temp\agent.exe")
Your code is telling it to run agent.exe
in the current directory and telling agent.exe
to use C:\temp
as its working directory.
It is recommended to use absolute paths. Otherwise you may end up in a situations like this one.
By using just a filename "agent.exe" your script assumes that the file is in the current working directory. This is fine as far as the working dir doesn't change.
Use this For example:
Run (@ScriptDir & "\agent.exe", @HomeDrive & "\temp")