Sign in to follow this  
Followers 0
MCT

running msiexec without exact path

2 posts in this topic

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')
    Sleep(2000)
    RunWait(msiexec /i @WindowsDir & '"\Temp\VmwareTools.msi" /qn Reboot=ReallySuppress')
ElseIf FileExists(@SystemDir & '\vmx_mode.dll') = 1 Then 
    Exit
    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')
EndIf

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

CheersNobby

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  
Followers 0