HockeyFan Posted September 23, 2005 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!
GaryFrost Posted September 23, 2005 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.
Josbe Posted September 23, 2005 Posted September 23, 2005 HockeyFan said: 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
HockeyFan Posted September 23, 2005 Author Posted September 23, 2005 Josbe said: 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!
HockeyFan Posted September 23, 2005 Author Posted September 23, 2005 gafrost said: 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.
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