system
1
(imported topic written by johnism91)
I know I can does this with a vb script but I am wondering if I can do it in the action and not have to download a VBs script and run it …
So I we have a leagcy app that requires some machine to have C:\Winnt instead of C:\Windows so that means %WINDIR% \MSIEXE.EXE I does not work .
I can get it work with C:\winnt\system32\msiexec.exe /i but I have machines that have both system directories C:\winnt and C:\Windows
is there anything that can be done or so somthing like this ?
wait if C:\winnt\system32\msiexec.exe = true then C:\winnt\system32\msiexec.exe /i “__Download\BLA.msi” REINSTALLMODE=VOMUS REINSTALL=ALL REBOOT=ReallySuppress /q
else C:\Windows\system32\msiexec.exe /i “__Download\BLA.msi” REINSTALLMODE=VOMUS REINSTALL=ALL REBOOT=ReallySuppress /q
system
2
(imported comment written by MattBoyd)
To answer your question about if statements, yes. You could do something like this:
if {exists file “C:\winnt\system32\msiexec.exe”}
wait C:\winnt\system32\msiexec.exe /i “__Download\BLA.msi” REINSTALLMODE=VOMUS REINSTALL=ALL REBOOT=ReallySuppress /q
else
wait C:\Windows\system32\msiexec.exe /i “__Download\BLA.msi” REINSTALLMODE=VOMUS REINSTALL=ALL REBOOT=ReallySuppress /q
endif
However, it’s probably just as easy to do this in your situation:
wait {pathname of system folder}\msiexec.exe /i “__Download\BLA.msi” REINSTALLMODE=VOMUS REINSTALL=ALL REBOOT=ReallySuppress /q
The relevance that’s between the curly braces above should return “C:\windows\system32” on WinXP and newer systems and “C:\winnt” on older systems.
Here’s a quickstart guide to action script: http://support.bigfix.com/bes/misc/customactions.html
And here’s a more thorough reference:http://support.bigfix.com/fixlet/documents/WinActions_20081110.pdf