Need installation macro
I need a macro that references the current location of the MSI file during installation. I have one specific MSI file that is giving me fits. This MSI has a config file reference. The path to the config file must be absolute and not realive path to the location of the installation file. Is there a macro that represents where the installation files are during execution? Since the deploy location is dynamic it is difficult to hard code the physical location of the MSI into the install string.
This command doesn’t work when manually executed on the target:
msiexec.exe /i "<someapp>.msi" CFG="syscfg.xml" /q
But this command does work when manually executed on the target:
msiexec.exe /i "<someapp>.msi" CFG=" C:\WINDOWS\PDQDeployRunner\1\exec\syscfg.xml" /q
I can confirm that the config file is being sent to the target. It would be great if there is a built in macro that would expand to “C:\WINDOWS\PDQDeployRunner\1\exec” during deployment. Something so I could use a deployment string like :
msiexec.exe /i "<someapp>.msi" CFG="$(InstallPath)\syscfg.xml" /q
Comments
Have you tried something like this:
msiexec.exe /i "<someapp>.msi" CFG=".\syscfg.xml" /q
We don't have that built in yet, but it is on our road map. In the meantime you can get what you want using the %CD% environment variable, which is a built-in environment variable that expands to the current directory. The only issue is that you need to run your installer as a batch file since the command line doesn't currently expand environment variables (something else we will be fixing). Environment variables within the batch file will be expanded when it's run.
@SelfMan: That idea worked great!! Such a simple answer to a problem I worked on for 3 hours today. Thank you very much.
@Adam: Please keep up the great development work on this product. This software has really helped in my environment.
@Ge: You are welcome... these are the small things which drive us crazy ;-)
@Adam: I think this would be worth of a KB entry.