Jump to content

Recommended Posts

Posted (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 by OiMunk
clarification
Posted
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")

 

Posted

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.

Posted

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.

Posted (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 by radienergos
Posted (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 by OiMunk
Posted

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 Gude
How 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

Posted

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.

Posted

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.

Posted

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. 

 

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...