Jump to content

RunWait ("notepad") Inop

Recommended Posts

I installed the current version of AutoIt and SciTE4AutoIt3 three days ago and am working through YouTube tutorials by TutsTeach and examples in Help. My very basic question is why the following will launch the Windows calculator, but not notepad nor msconfig:

Local $iPID = Run("notepad.exe", "", @SW_SHOWMAXIMIZED)
    ; Wait 10 seconds for the Notepad window to appear.
    WinWait("[CLASS:Notepad]", "", 10)

    ; Wait for 2 seconds.
Run ("notepad")
RunWait ("notepad")

RunWait(@ComSpec & " /c Start Notepad.exe")


RunWait ("calc")

RunWait ("msconfig")

RunWait(@ComSpec & " /c ip a >Test01.txt")

I tried other variants as well, but no joy.

Note that both notepad and msconfig do launch successfully from the DOS prompt regardless of what is the current directory. Even a locally written batch file (ip.bat) runs successfully and writes its output to Test01.txt from within my .au3 script.

Running 64x Win7 SP1.

Thank you,


Share this post

Link to post
Share on other sites

Its a 64bit/32bit issue MSConfig is in the System32 folder but if you're not specifying this.  It's looking for it in the SysWOW64 folder.

You can turn off redirection like this:

#Include <WinAPIFiles.au3>


 Or you can specify the full path to MSConfig.


Share this post

Link to post
Share on other sites

Hi ViciousXUSMC


Your help was spot on! My code snippet worked perfectly.

It would have saved me a bunch of frustration if the documentation had mentioned the 64bit issue up front somewhere for newbies like myself who are just trying to run the simplest examples.

I really appreciate the fast and accurate reply to my question.

Many thanks!


PS, How do I edit the subject line to show "SOLVED"?

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

  • Create New...