Jump to content
Sign in to follow this  

running msiexec without exact path

Recommended Posts


the only way im able to execute an msi + parameters is to use an exact path, but id rather replace c:\windows with @Windowsdir so its less machine dependant

my current code is:

$CD = RegRead("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Setup", "SourcePath")
If FileExists(@SystemDir & '\vmx_mode.dll') = 0 Then
    RunWait($CD & '\Install\Apps\Vmware\Vmwaretools.exe')
    RunWait(msiexec /i @WindowsDir & '"\Temp\VmwareTools.msi" /qn Reboot=ReallySuppress')
ElseIf FileExists(@SystemDir & '\vmx_mode.dll') = 1 Then 
    RunWait(/msiexec /i $CD & '"\Install\Apps\Vmware\VMware.msi" /Qn TARGETDIR="%ProgramFiles%\VMware" ADDLOCAL=ALL DISABLE_AUTORUN=0 DESKTOP_SHORTCUT=0 SERIALNUMBER=XXXX-XXXX-XXXX-XXXX USERNAME=Administrator')
    RunWait('"REGEDIT.EXE" /S %Cdrom%\Install\Reg\Vmware.reg')

the above code as i said doesnt work, i have to replace the variables with exact path, can some1 help please :P

Share this post

Link to post
Share on other sites

This works for me:

RunWait("msiexec /i " & @WindowsDir & '"\Temp\VmwareTools.msi" /qn Reboot=ReallySuppress')


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  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.