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:
Or, run the command \\\"start\\\" which will automatically work out how to execute the file for you:
RunWait(@COMSPEC & \\\" /c Start myfile.msi\\\")
Or, use the ShellExecuteWait function which will automatically work out how to execute the file for you:
ShellExecuteWait(\\\"myfile.msi\\\")Note : Please avoid \\ because i dont know why it comes with every post while i uses commas.
Edited by Jos07, 25 May 2008 - 11:36 AM.