We’re moving our forums to a new platform.

You can still browse and search existing topics, but you can no longer create new topics or post replies.

For questions, technical issues, or feature requests, please don’t hesitate to contact our support team at support@advancedinstaller.com.

Thank you for your understanding!

Timmah
Posts: 12
Joined: Wed May 22, 2013 9:48 am

Conditionally hide Add/Remove Programs with property

Hi,

I found this thread: http://www.advancedinstaller.com/forums ... 02&p=17296

But their requirement was slightly different.

I want to be able to conditionally hide the entry in Add/Remove Programs, if a particular property is set when msiexec is called. Is this possible?

Thanks for any help!

Tim
Daniel
Posts: 8283
Joined: Mon Apr 02, 2012 1:11 pm
Contact: Website

Re: Conditionally hide Add/Remove Programs with property

Hi Tim,

Unfortunately, this is not supported by Windows Installer and is also against Windows Installer guidelines. However, as a workaround, you can try to use the following approach:
1. check the "Override Windows Installer programs list entry" option from "Product Details" page
2. go to "Table Editor" page, select the "Component" table and add your property (e.g. TEST_PROP) in the "Condition" field of the "AI_CustomARPName" component, like this:

Code: Select all

TEST_PROP
3. build and test the project

The control panel entry should be created when the "TEST_PROP" property is set (e.g. from command line) and shouldn't be created when the "TEST_PROP" is not set.

Please keep in mind that this workaround it is not recommended at all and you should thoroughly test your installation scenario after implementing it to make sure everything works as expected.

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Timmah
Posts: 12
Joined: Wed May 22, 2013 9:48 am

Re: Conditionally hide Add/Remove Programs with property

Hi Daniel,

Many thanks for the suggestion.

Do you know of any way to do it with a Professional license? The Table Editor appears to require an Enterprise license.

Kind regards,

Tim
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Conditionally hide Add/Remove Programs with property

Hi Tim,

I'm afraid there is no way to do it with a Professional license.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Timmah
Posts: 12
Joined: Wed May 22, 2013 9:48 am

Re: Conditionally hide Add/Remove Programs with property

Hi Bogdan,

Many thanks for the reply.

What about a subtle difference: instead of removing the entry entirely from Add/Remove programs, what if we can dynamically toggle the "Disable remove", from a property?

Thanks again for any help,

Tim
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Conditionally hide Add/Remove Programs with property

Hi Tim,

The property you can use is ARPNOREMOVE.
Set the value of this property to "1" from command line and the "Remove" option from Control Panel will not be available anymore.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Timmah
Posts: 12
Joined: Wed May 22, 2013 9:48 am

Re: Conditionally hide Add/Remove Programs with property

Hey Bogdan,

Works a treat. Thanks very much!

Tim
Timmah
Posts: 12
Joined: Wed May 22, 2013 9:48 am

Re: Conditionally hide Add/Remove Programs with property

Hi folks,

http://msdn.microsoft.com/en-us/library ... s.85).aspx

This seems to work. If the target platforms are for Win7 or above, is this a supported approach?

Thanks!

Tim
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Conditionally hide Add/Remove Programs with property

Hi Tim,

Yes,this is supported on the operating systems specified in the Requirements sections from the documentation.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”