Jump to content

Help with RunWait


HockeyFan
 Share

Recommended Posts

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

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

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)
Link to comment
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! ;)

Link to comment
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. ;)

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...