Zad Posted October 6, 2015 Share Posted October 6, 2015 I have this weird problem... Autoit cannot run this properly: $DOS = Run('c:\windows\system32\msg.exe Billy test', "", $STDOUT_CHILD + $STDERR_CHILD) When I change the command to: $DOS = Run('cmd /k c:\windows\system32\msg.exe fernando test', "", $STDOUT_CHILD + $STDERR_CHILD) It produces the following error'c:\windows\system32\msg.exe' is not recognized as an internal or external command operable program or batch file. Since the command prompt remains open I can check a few things. When I go to c:\windows\system32 and do a dir *.exe, for some reason msg.exe is not listed. However if I just click on Start->Run and open up a command prompt that way and go to c:\windows\system32 and do a dir *.exe msg.exe does show up. msg.exe is a messaging utility that is included with windows 7/8.As a test I copied msg.exe from c:\windows\system32 to c:\temp and I can run it from there just fine, seems like a problem with c:\windows\system32 being a system folder. I am going crazy trying to make this work. Would appreciate any help. Link to comment Share on other sites More sharing options...
AdamUL Posted October 6, 2015 Share Posted October 6, 2015 Are you running a 32-bit or 64-bit system? Adam Link to comment Share on other sites More sharing options...
Zad Posted October 6, 2015 Author Share Posted October 6, 2015 64-bit Link to comment Share on other sites More sharing options...
AdamUL Posted October 6, 2015 Share Posted October 6, 2015 (edited) That what I thought. I ran into this issue just last week with a different command. I try running the script as 64-bit. Use the following. #AutoIt3Wrapper_UseX64=y Adam Edited October 6, 2015 by AdamUL Link to comment Share on other sites More sharing options...
Zad Posted October 6, 2015 Author Share Posted October 6, 2015 Thank you for trying to help, but the problem still occurs after putting that statement. Link to comment Share on other sites More sharing options...
AdamUL Posted October 6, 2015 Share Posted October 6, 2015 Are you using the full SciTE4AutoIt? Also take at look at Running under Windows 64-bit Edition. You can try this as well. #include <WinAPIFiles.au3> _WinAPI_Wow64EnableWow64FsRedirection(False) $DOS = Run('c:\windows\system32\msg.exe Billy test', "", $STDOUT_CHILD + $STDERR_CHILD) Adam gspino 1 Link to comment Share on other sites More sharing options...
Zad Posted October 6, 2015 Author Share Posted October 6, 2015 That worked! Thanks for taking the time to help me.This is what I'm using:SciTE-Lite Version 3.5.4Looks like I'm using the 32-bit version, but I think I installed both.I work mostly with 64-bit systems...should I just re-install the 64-bit version only? Link to comment Share on other sites More sharing options...
AdamUL Posted October 6, 2015 Share Posted October 6, 2015 Your welcome. Since you have SciTe-Lite, that is why the directive wouldn't work. You can download the full installer for SciTE4AutoIt3, and to see its only Help file. It includes a lot of things that will help with scripting. AutoIt installs both the 32 and 64 bit versions. When you install AutoIt on a 64-bit system, you have the choice to use the 32 or 64 bit by default. I usually just use the directive to switch between the two. I usually only use the 64-bit version when I really need to. Adam 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