Retrieve Setup-file Name - Advanced Installer Community
cos
Posts: 10
Joined: Mon Dec 27, 2010 11:43 am

Retrieve Setup-file Name

Hello,

I need to retrieve the name of the setup file originally used to install the product.

The setup file should write it's own file name in the registry in order for my app to retrieve it later. I was not able to find this option in Edit Registry Entry > Property, so how can I do that?

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

Re: Retrieve Setup-file Name

Hi,

Unfortunately the setup file name cannot be retrieved during installation. However, you can try this approach:
- create a custom property in "Install Parameters" page, for example SETUP_NAME
- set it to your setup name
- use this property in "Media" page for the MSI or bootstrapper name
- write the same property in registry through our Registry page

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
cos
Posts: 10
Joined: Mon Dec 27, 2010 11:43 am

Re: Retrieve Setup-file Name

Hi Cosmin,

Thanks for the reply. I use a dynamic naming convention for setup files in order to track the source of the download so I will need to dynamically set the SETUP_NAME property. Can I do that?

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

Re: Retrieve Setup-file Name

Hi,

I checked with our developers and it seems we are using an internal property which contains the setup file full path. It's named AI_SETUPEXEPATH and it's set only when using an EXE bootstrapper. If you are using a MSI you can use OriginalDatabase property. Inside your package you can try using a custom action which retrieves the setup name from the path.

In DLL custom actions you can access a property through MsiGetProperty function and in VBScript you can use Session.Property().

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”