I have created an installer using Visual Studio 2015 (with the Visual Studio installer addon). The goal is to always run the APP with the same local resources, regardless o
I don't use that particular tool. There might be a better way to achieve what you want than the below "hack". Adding since you got no other answers (yet).
UPDATE: Go with Phil's answer. I don't have the tool to check but it looks good. Leaving in this answer just for the record. Not recommended unless you have other things you want to change.
Hiding Control: Not ideal, but if you don't mind post-processing the MSI (can be automated with MSI API coding) you could insert a row into the ControlCondition table to hide the whole dialog control in question.
Ad-hoc sample: Hiding the "Back" button from a setup's LicenseAgreementDlg
- just add this row (I guess events defined elsewhere could show it again):
.
Dialog at runtime: Below is the actual dialog at runtime.
To automate the above. Get hold of WiRunSQL.vbs
- part of the Windows SDK - just search your SDK folder if you have Visual Studio installed. Also plenty of copies on github.
In a batch file:
cscript.exe "%~dp0"\WiRunSQL.vbs "MySetup.msi" "INSERT INTO `ControlCondition` (`Dialog_`, `Control_`, `Action`, `Condition`) VALUES ('LicenseAgreementDlg', 'Back', 'Hide', '1')"
pause
I honestly might hard code ALLUSERS=1
in the Property table as well.