Why does AutoHotkey respond with a "System cannot find file" error?

I am new to AutoHotkey and don't understand why this script gives me an error:

 Failed to launch program or document
 Action: <C:\Windows\System32\msg.exe>
 Params: <* "Initiated.">
 Specifically: The system cannot find the file specified.

Here is a simple script in my test.ahk file:

Run, "C:\Windows\System32\msg.exe" * "Initiated."

I checked that the msg.exe file is located in the c: \ Windows \ System32 folder, and I can run it without a script from the command line and clicking on the msg.exe program. I can also create a shortcut for msg.exe and it works, but I cannot figure out how to get the test.ahk script file to see it.

I tried to run the script (by clicking the test.ahk file) as Administrator, but getting the same error.

+4
source share
1 answer

This path is redirected to C:\Windows\SysWOW64for 32-bit programs.

script "C:\Windows\SysNative\msg.exe"

, , .

+6

All Articles