blumi Posted March 27, 2018 Posted March 27, 2018 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
Subz Posted March 27, 2018 Posted March 27, 2018 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"')
blumi Posted March 28, 2018 Author Posted March 28, 2018 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?
Juvigy Posted March 28, 2018 Posted March 28, 2018 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
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