Jump to content
blumi

Shelexecute & Transform File

Recommended Posts

blumi

I found here some Syntax like this.

ShellExecuteWait('msiexec', '/L*v "%TEMP%\log.log" /i "install.Msi" TRANSFORMS="install.mst" /qb')

I tried the same but with some variables which contain some paths and names.

$Setup="\\server\path\path\setup.msi"
$Parameter="trans.mst"

ShellExecuteWait('msiexec', '/L ' & @DesktopDir & "\log.log"' /i "' & $Setup & '" TRANSFORMS="'&$Parameter&'" /qb')

Does the tranform Parameter need the path to the file too?

It is in the same directory as the MSI file

Thank you

Share this post


Link to post
Share on other sites
Subz

Usually best practice to put the path in, noticed you're missing a double quote before @DesktopDir.  If your script is going to be in the same directory as the msi, you can use something like this:

Local $sMsiFilePath = @ScriptDir & "\setup.msi"
Local $sTransform = @ScriptDir & "\trans.mst"

RunWait('MsiExec.exe /i "' & $sMsiFilePath & '" TRANSFORMS="' & $sTransform & '" /qb /l "' & @DesktopDir & '\log.log"')

 

Share this post


Link to post
Share on other sites
blumi
21 hours ago, Subz said:

Usually best practice to put the path in, noticed you're missing a double quote before @DesktopDir.  If your script is going to be in the same directory as the msi, you can use something like this:

Local $sMsiFilePath = @ScriptDir & "\setup.msi"
Local $sTransform = @ScriptDir & "\trans.mst"

RunWait('MsiExec.exe /i "' & $sMsiFilePath & '" TRANSFORMS="' & $sTransform & '" /qb /l "' & @DesktopDir & '\log.log"')

 

That works fine, thank you.

Why do you use RunWait instead of ShellexecuteWait?

Share this post


Link to post
Share on other sites
Juvigy

If you dont have MSIExec.exe associated with MSI files Shellexecute will fail. I guess it is that or he just like Run command better :)

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

×