DECISION:
Installation is performed in the SYSTEM account. Therefore, the created process also runs in the specified account, and not as the user currently logged in.
I created an additional project (InstallHelper) that includes
Process.Start("Outlook");
I added InstallHelper as CustomAction on Commit in my installation project and changed the InstallerClass to False in the CustomAction properties. Then I copied the WiRunSql.vbs file to the project folder and added PostBuildEvent to the installation project:
@echo off
cscript //nologo "$(ProjectDir)WiRunSql.vbs" "$(BuiltOutputPath)" "UPDATE CustomAction SET Type=1554 WHERE Type=3602"
3602:
- 0x800 (msidbCustomActionTypeNoImpersonate)
- 0x400 (msidbCustomActionTypeInScript)
- 0x200 (msidbCustomActionTypeCommit)
- 0x12 (Custom Action Type 18: exe)
1554:
- 0x400 (msidbCustomActionTypeInScript)
- 0x200 (msidbCustomActionTypeCommit)
- 0x12 (Custom Action Type 18: exe)
:
msdn: Custom Action In- Script
msidbCustomActionTypeNoImpersonate (0x00000800), InstallHelper , SYSTEM.
msi orca ( , ).