RaySS Posted December 10, 2015 Share Posted December 10, 2015 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. Sleep(2000)Run ("notepad")RunWait ("notepad") RunWait(@ComSpec & " /c Start Notepad.exe") ShellExecuteWait("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,RaySS Link to comment Share on other sites More sharing options...
ViciousXUSMC Posted December 10, 2015 Share Posted December 10, 2015 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> _WinAPI_Wow64EnableWow64FsRedirection(False) Run("msconfig") Or you can specify the full path to MSConfig.C:\Windows\System32\MsConfig.exe Link to comment Share on other sites More sharing options...
RaySS Posted December 10, 2015 Author Share Posted December 10, 2015 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!RaySSPS, How do I edit the subject line to show "SOLVED"? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now