HockeyFan Posted September 23, 2005 Share Posted September 23, 2005 Can someone tell me why my run command is not working? I'm tryint to script an msi install but I keep getting the following error: Unable to execute the external program. The parameter is incorrect. All files are in the specified directory location.RunWait("C:\Windows\System32\msiexe.exe /package C:\Documents and Settings\Admin\Desktop\MessageAlertv6\MessageAlert.msi /passive /norestart","C:\Documents and Settings\Admin\Desktop\MessageAlertv6",@SW_HIDE)I've run this from a command prompt and it ran just fine. I'm sure it's a syntax error but I can't figure it out. Thanks! Link to comment Share on other sites More sharing options...
GaryFrost Posted September 23, 2005 Share Posted September 23, 2005 try using quotes for example: RunWait('C:\Windows\System32\msiexe.exe /package "C:\Documents and Settings\Admin\Desktop\MessageAlertv6\MessageAlert.msi" /passive /norestart',"C:\Documents and Settings\Admin\Desktop\MessageAlertv6",@SW_HIDE) SciTE for AutoItDirections for Submitting Standard UDFs Don't argue with an idiot; people watching may not be able to tell the difference. Link to comment Share on other sites More sharing options...
Josbe Posted September 23, 2005 Share Posted September 23, 2005 Can someone tell me why my run command is not working? I'm tryint to script an msi install but I keep getting the following error: Unable to execute the external program. The parameter is incorrect. All files are in the specified directory location.RunWait("C:\Windows\System32\msiexe.exe /package C:\Documents and Settings\Admin\Desktop\MessageAlertv6\MessageAlert.msi /passive /norestart","C:\Documents and Settings\Admin\Desktop\MessageAlertv6",@SW_HIDE)I've run this from a command prompt and it ran just fine. I'm sure it's a syntax error but I can't figure it out. Thanks!Try this:In fact that you wrote wrong the word: "msiexec": $sPathMSI= "C:\Documents and Settings\Admin\Desktop\MessageAlertv6\MessageAlert.msi" $sPathDir = StringLeft( $sPathMSI, StringInStr( $sPathMSI, '\', -1, -1) ) RunWait( 'msiexec "' & $sPathMSI & '" /package /passive /norestart', $sPathDir, @SW_HIDE) AUTOIT > AutoIt docs / Beta folder - AutoIt latest beta Link to comment Share on other sites More sharing options...
HockeyFan Posted September 23, 2005 Author Share Posted September 23, 2005 Try this:In fact that you wrote wrong the word: "msiexec": $sPathMSI= "C:\Documents and Settings\Admin\Desktop\MessageAlertv6\MessageAlert.msi" $sPathDir = StringLeft( $sPathMSI, StringInStr( $sPathMSI, '\', -1, -1) ) RunWait( 'msiexec "' & $sPathMSI & '" /package /passive /norestart', $sPathDir, @SW_HIDE)Opps...my bad! That was a typo on my part. It is correct in the code itself. :"> Thanks for the code example...I like it! Link to comment Share on other sites More sharing options...
HockeyFan Posted September 23, 2005 Author Share Posted September 23, 2005 try using quotes for example: RunWait('C:\Windows\System32\msiexe.exe /package "C:\Documents and Settings\Admin\Desktop\MessageAlertv6\MessageAlert.msi" /passive /norestart',"C:\Documents and Settings\Admin\Desktop\MessageAlertv6",@SW_HIDE) Thanks...putting in the quotes worked. 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