Sign in to follow this  
Followers 0
HockeyFan

Help with RunWait

5 posts in this topic

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!

Share this post


Link to post
Share on other sites



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.

 

Share this post


Link to post
Share on other sites

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)

Share this post


Link to post
Share on other sites

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! ;)

Share this post


Link to post
Share on other sites

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. ;)

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0