OiMunk Posted December 21, 2016 Share Posted December 21, 2016 (edited) This line works: ShellExecute("notepad.exe","","C:\Windows\System32\") This one doesn't: ShellExecute("TotalMixFX.exe","","C:\Windows\System32\") I get the error: "Windows Cannot Find...". I've quadruple checked the spelling of "TotalMixFX.exe". Similarly, this line works: Run("C:\Windows\System32\notepad.exe") But this one doesn't: Run("C:\Windows\System32\TotalMixFX.exe") Nothing happens. I can click on the icon normally, create shortcuts for it, check its properties, but AutoIt can't open it. Ideas please? Alternate methods of opening a file? Edited December 21, 2016 by OiMunk clarification Link to comment Share on other sites More sharing options...
genius257 Posted December 21, 2016 Share Posted December 21, 2016 MsgBox(0, "", "File exists: "&(FileExists("C:\Windows\System32\TotalMixFX.exe")?"Yes":"No")) Check if the executable is located at the specified path. If yes, try running it with the cmd. If it launches successfully with cmd, and not with Autoit, maybe do something like: RunWait(@ComSpec & " /c start C:\Windows\System32\TotalMixFX.exe") My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
Juvigy Posted December 21, 2016 Share Posted December 21, 2016 What OS are you running on and is it 32/64 bit? Do you have #requireadmin ? Link to comment Share on other sites More sharing options...
genius257 Posted December 22, 2016 Share Posted December 22, 2016 I am running Win7 x64/Win10 x32 On both systems i don't have "TotalMixFX.exe" within my system32 directory, and i have failed to get it on a virtual machine (win7 x64). So i was trying to help, but i have no way of troubleshoot on my end. My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
Juvigy Posted December 22, 2016 Share Posted December 22, 2016 I was asking OiMunk. TotalMixFX must have been put in the system32 from an installed software. I suspect the issue comes from security in windows. Notepad has a system variable and windows knows exactly where it is even if you dont specify the full path. Link to comment Share on other sites More sharing options...
radienergos Posted December 22, 2016 Share Posted December 22, 2016 (edited) did you tried C:\Windows\SysWOW64 ? System32 64 Windows System folder (system directory) for 64-bit files SysWOW64 32 Windows System folder (system directory) for 32-bit files Edited December 22, 2016 by radienergos Link to comment Share on other sites More sharing options...
OiMunk Posted December 22, 2016 Author Share Posted December 22, 2016 (edited) Thanks All. Update: I can open the .exe from the Cmd line, but not AutoIt, or any other program that opens .exe files. I tried, RunWait(@ComSpec & " /c start C:\Windows\System32\TotalMixFX.exe") as suggested with no effect. I do not have #requireadmin. I'm using Win7, 64bit. The TotalMixFX.exe originates from an installer (It's the control software for a hardware audio interface). I suspect, as suggested, that there's some security feature surrounding this file, but I'm not sure how to verify that, or circumvent it. I did RightClick->Properties->Security on the file, and it appears that all "Permissions" are "Allowed". I'm not sure how to "try" C:\Windows\SysWOW64 as suggested above: the file is definitely in System32, not SysWOW64. Interestingly, this line works perfectly in AutoHotKey Run, C:\WINDOWS\System32\TotalMixFX.exe Edited December 22, 2016 by OiMunk Link to comment Share on other sites More sharing options...
BrewManNH Posted December 23, 2016 Share Posted December 23, 2016 Are you compiling it as a 64bit app? If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag GudeHow to ask questions the smart way! I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from. Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays. - ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script. - Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label. - _FileGetProperty - Retrieve the properties of a file - SciTE Toolbar - A toolbar demo for use with the SciTE editor - GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI. - Latin Square password generator Link to comment Share on other sites More sharing options...
OiMunk Posted December 23, 2016 Author Share Posted December 23, 2016 I've tried it both ways (64+32), same result, but for now I'm just trying to run it from within SciTe. Link to comment Share on other sites More sharing options...
genius257 Posted December 23, 2016 Share Posted December 23, 2016 Will "TotalMixFX.exe" run, if a non assiciated AutoIt application is running in the background? Maybe it's programmed to fail startup, if certain types of processes are running? My highlighted topics: AutoIt Package Manager, AutoItObject Pure AutoIt, AutoIt extension for Visual Studio Code Github: AutoIt HTTP Server, AutoIt HTML Parser Link to comment Share on other sites More sharing options...
OiMunk Posted December 23, 2016 Author Share Posted December 23, 2016 Prodigy: The error returned from AutoIt says "Cannot find file". TotalMixFX.exe runs perfectly when I manually run it. The problem is that AutoIt can't find the file. I actually have an AutoIt script running at all times. Link to comment Share on other sites More sharing options...
Developers Jos Posted December 23, 2016 Developers Share Posted December 23, 2016 show me the SciTE oputput pane information when you run the script. Simply cut&paste the text into a codeblock in your reply. 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...
Juvigy Posted December 23, 2016 Share Posted December 23, 2016 Check out this topic. I think you have the same issue. There are several solutions that you can try there: genius257 1 Link to comment Share on other sites More sharing options...
OiMunk Posted December 24, 2016 Author Share Posted December 24, 2016 Amazing! That thread has the solution, even though it's absurd. ShellExecute("TotalMixFX.exe") ; this works! because the .exe is in the system32 folder and this will never work: ShellExecute("TotalMixFX.exe","","C:\Windows\System32\") ;because the .exe is in the system32 folder... Go figure. Link to comment Share on other sites More sharing options...
Developers Jos Posted December 24, 2016 Developers Share Posted December 24, 2016 (edited) One other thing to remember is that the 3rd parameter is the workdir, not the path where to find the exe! Jos Edited December 24, 2016 by 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...
OiMunk Posted December 25, 2016 Author Share Posted December 25, 2016 It's no longer working. ShellExecute("TotalMixFX.exe") ; worked perfectly yesterday, and today it says it can't find the file, without any code change. I'll investigate the "working directory" aspect. 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