InsiDer Posted October 11, 2006 Share Posted October 11, 2006 Now I'm probably asking something which is blatantly obvious....oh well -.- While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop Select Case $msg = $about2item $rc = run ("readme.txt") Case $msg = $about3item $rc = Run ("History.txt") Case $msg = $browseitem $rc = Run ("Browser.exe") While the browser.exe works like a charm, the text files won't be executed...what's the alternative to this command? Link to comment Share on other sites More sharing options...
Developers Jos Posted October 11, 2006 Developers Share Posted October 11, 2006 Now I'm probably asking something which is blatantly obvious....oh well -.-Yes... FAQ 6 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...
Valuater Posted October 11, 2006 Share Posted October 11, 2006 (edited) #66. Why can I only use Run() to execute .exe files? What about .msi / .txt and others? Only a few file extensions are usually "runable" - these are .exe, .bat, .com, .pif. Other file types like .txt and .msi are actually executed with another program. When you double click on a "myfile.msi" file what actually happens in the background is that "msiexec.exe myfile.msi" is executed. So to run a .msi file from AutoIt you would do: RunWait("msiexec myfile.msi") Or, an even simpler way is to run the command " start" which will automatically work out how to execute the file for you: RunWait(@COMSPEC & " /c Start myfile.msi")8) Edited October 11, 2006 by Valuater Link to comment Share on other sites More sharing options...
NELyon Posted October 11, 2006 Share Posted October 11, 2006 or use ShellExecute if you have the latest beta Link to comment Share on other sites More sharing options...
InsiDer Posted October 11, 2006 Author Share Posted October 11, 2006 (edited) Thank you Valuater, once again your advice has been a valuable guidance for me. I'll be back with more problems later Edited October 11, 2006 by InsiDer 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