Summary
Attempting to use the SRCDIR variable in an InstallScript custom action after a first time install (such as a minor upgrade) results in a path that does not point to the location of the MSI package, but instead resolves to a path in the temp folder.Symptoms
Attempting to use the SRCDIR variable in an InstallScript custom action after a first time install (such as a minor upgrade) results in a path that does not point to the location of the MSI package, but instead resolves to a path in the temp folder.
Cause
This is expected behavior for Basic MSI projects. The InstallScript engine uses the Windows Installer API MsiGetSourcePath to determine the resolved value for SourceDir, which SRCDIR is then set to. However, after a first time install, attempting to resolve SourceDir will cause a prompt for the original source media, which is typically not desired when there is no need for the media. If the InstallScript engine determines that the setup is not running in a first time install, it does not attempt to get a value for SourceDir. The SRCDIR variable points to the runtime location of the compiled setup.inx (typically a temp folder location) when SourceDir is not resolved.
Note that InstallScript and InstallScript MSI projects do not exhibit this behavior as the SRCDIR location is stored in the InstallScript log file.
Resolution
The SRCDIR variable should only be used in custom actions that run during a first time install. During a maintenance scenario, such as a minor upgrade, the SETUPEXEDIR property can be used to determine the path to the source media when launching from setup.exe.
Additional Information
More information can be found in the following articles:
- SRCDIR
- See Realted KB Articles section for article Q105487, PRB: SourceDir and SRCDIR Resolve to a Location Under the Temp Directory
- ResolveSource Action.
Related KB Articles
Q105487Related Articles
SourceDir and SRCDIR Resolve to a Location Under Temp Directory 3Number of Views Suite Installer MSI Package is Not Found When Installing New Features via the Windows Control Panel 9Number of Views Effective MSI Package Version Management 4Number of Views InstallScript MSI Installs to Default Location During Minor Upgrades 3Number of Views Launch an MSI Package Through a Custom Action in Express 3Number of Views
Hi, I am Reva - Ask me anything.
No new updates
Thanks for the feedback!
Your feedback has been saved.Rate this response:
Add Additional feedback ( Optional )
Are you sure you want to cancel
the case creation?
Are you sure you want to cancel the case creation?
Are you sure you want to close this case
| Products | Region | Phone Numbers |
|---|---|---|
| FlexNet Operations FlexNet Embedded FlexNet Publisher FlexNet Connect FlexNet Code Insight InstallAnywhere InstallShield |
North America * |
+1 630-332-2513 (toll) +1 877-279-2853 (toll-free in North America) |
| Europe * |
+44 1925 944367 (toll) +44 800 047 8642 (toll-free in Europe) |
|
| Japan * | +81 3-4540-5335 (select option 2) | |
| Australia * |
+61 3 9895 2177 +61 1800 560 603 (toll-free in Australia) |
|
|
Usage Intelligence (formerly
Revulytics) Compliance Intelligence |
Please use the Case Portal to submit your support ticket or reach out to your Revenera contact. | |
Case id: 00001065
Activity: Status change: 2 hours ago