Jump to content

Recommended Posts

Posted

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!

Posted

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.

 

Posted

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)
Posted

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

Posted

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

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
  • Recently Browsing   0 members

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