The following is more useful when you have and MSI and an MST that are giving you hassle.
Every now and again I need to execute an MSI and an MST from a previously unknown network location - for instance SMS distribution share, Altiris deployment server etc. etc.
Normally I'd need to browse to the network share and manually enter (or drag/drop) in Start/Run:
msiexec /i [long and complicated path]\MyInstall.msi /t [the same long and complicated path]\MyTransform.mst
Instead, I always create this simple bat file and keep it together with the msi/mst:
@Echo Off
msiexec /i "%~dp0MyMsiInstall.msi" TRANSFORMS="%~dp0MyTransform.mst"
Notably:
1. %~dp0 - returns the current path where this very bat file is (and where the msi and the mst files are too...)
2. when you enclose the whole variable/filename in quotation marks (as above), you can have spaces in the path and/or the msi file name without any troubles...
3. there is NO backslash ( \ ) between %~dp0 and the filename afterwards
----
Why do you ever need to run an msi/mst from a network share - for testing purposes of course...
Sometimes because of a failed install or the whole script not executing or the ghastly 'I set the install job 2 hours ago and still no sign of it...'
so, save some time, its precious...
That looks good - will be interested in trying it out to see how it works, the other thing to remember if doing this manually you can call on the transform by using TRANSFORMS="Transfrom.MST" - you don’t need the path as it will automatically look inside the same folder as the MSI
Kind Regards
spef
Hopefully some packaging tips comming to www.spefdata.com - Spef 12 years ago