canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Change "Do not register with Windows Installer" at runtime?

Hello everyone.

Can the "Do not register with Windows Installer" switch be toggled at runtime?

Image such a configuration dialog in the installer:

|-Installation Type ---------------------------|
| |
| ( ) Current user only. |
| (o) All users. |
| |
| ( ) Installation on removable media |
| |
|------------------------------------------------|

The part for "Current user" or "All users" is done and works. But we would like to support installing on removable media with the exact same installer, too.

But even if we decide to add another build, to have a separate installer for the removable media installation we would still need to be able to toggle that setting in a scripted fashion, somehow. I also looked at the command line options of AI but couldn't find one to alter this setting in the AIP file. I guess I could manipulate the AIP file via script, but I am not too keen on doing that of course.



With best regards

Clemens Anhuth
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Change "Do not register with Windows Installer" at runtime?

Hi Clemens,

I'm afraid that the "Do not register the product with Windows Installer" option cannot be configured at runtime.

This option is represented by some registry entries created automatically by Windows Installer. Therefore, a solution would be to condition the standard actions which create these entries. The standard actions are:
- RegisterProduct
- PublishComponents
- PublishFeatures
- PublishProduct


Currently Advanced Installer cannot condition standard actions. Therefore, this can be done only by editing the MSI with Orca (the standard actions are in the "InstallExecuteSequence" table in the MSI).

Another approach is to perform an Administrative install for the MSI. This requires the "/a" parameter to be passed to the MSI, therefore a custom bootstrapper or command line is required.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
canhuth
Posts: 241
Joined: Thu Jun 19, 2008 9:03 am

Re: Change "Do not register with Windows Installer" at runtime?

Hello Cosmin,

thank you for the information. We'll stick to a separate installer for removable media for the time being then.



With best regards

Clemens Anhuth

Return to “Common Problems”