Zein Posted December 13, 2018 Share Posted December 13, 2018 Recently my hard drive died on me, and upon restoring all of my work and getting a fresh install of windows on a new SSD, my AutoIT's behavior has changed. Scenario: I have a batch file which launches a variety of other batch files and eventually launches my software. Along the way, Microsoft VS is used to compile temporary files. Prior to my hard drive crashing, if I did: Run("C:\Users\zein\Desktop\soft\soft\scripts\runSoft.bat") It would successfully load the program from beginning to end. But now if I try to do the same exact thing (no code changes in the batch file nor my autoIT script), I receive this error in my command prompt: Error: "Cannot determine the location of the VS Common Tools folder." If I manually use my command prompt to run the batch file, it works perfectly fine. What could cause AutoIT displaying different behavior from my manual attempts as well as my previous installation? Thanks. If it matters, my previously compiled versions of the script (prior to hard drive failure) also cause the same issue now. Link to comment Share on other sites More sharing options...
Developers Jos Posted December 13, 2018 Developers Share Posted December 13, 2018 Does it need to run in x64 instead of x86? Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Zein Posted December 13, 2018 Author Share Posted December 13, 2018 (edited) I think it needs to run specifically in x86, but if it did need x64 how would I alter that? Tried to manually run it with a 32-bit cmd and it failed in the same way. Looks like I do need a x64 now. Edited December 13, 2018 by Zein Link to comment Share on other sites More sharing options...
Developers Jos Posted December 13, 2018 Developers Share Posted December 13, 2018 Depends whether you use AutoIt3Wrapper or not, but you either run it manually with autoit_x64.exe manually or use the AutoIt3Wrapper directive: #AutoIt3Wrapper_UseX64=y .. when you have the Full SciTE4AutoIt3 installed. Jos SciTE4AutoIt3 Full installer Download page - Beta files Read before posting How to post scriptsource Forum etiquette Forum Rules Live for the present, Dream of the future, Learn from the past. Link to comment Share on other sites More sharing options...
Zein Posted December 13, 2018 Author Share Posted December 13, 2018 2 minutes ago, Jos said: Depends whether you use AutoIt3Wrapper or not, but you either run it manually with autoit_x64.exe manually or use the AutoIt3Wrapper directive: #AutoIt3Wrapper_UseX64=y .. when you have the Full SciTE4AutoIt3 installed. Jos Worked like a charm, thank you! First time I've run into a 86/64 bit difference, I'll keep it in mind in the future. Link to comment Share on other sites More sharing options...
Subz Posted December 13, 2018 Share Posted December 13, 2018 If you want to use a single 32-bit script you can look at using _WinAPI_Wow64EnableWow64FsRedirection() function, find it easier to maintain one script rather than x86/x64 versions IMHO. Example: nb: C:\Windows\System32\CMD.exe can run in 32 or 64 bit mode. #include <WinAPIFiles.au3> _WinAPI_Wow64EnableWow64FsRedirection (False) ;Run 64-bit version RunWait(@ComSpec) _WinAPI_Wow64EnableWow64FsRedirection (True) ;~ Run 32-bit version RunWait(@ComSpec) 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