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!

vlbrgt
Posts: 12
Joined: Thu Jan 23, 2020 6:55 pm

Upgradecode

Hello,

Is it possible to retrieve the upgradecode from a msi file created by Advanced Installer.
I need this because i lost my original .aip file.
I think that without this upgradecode it will not be possible to Automatically upgrade older product version

Thanks
Regards
Etienne
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Upgradecode

Hello Etienne and welcome to Advanced Installer forums,

In order to achieve that, you can follow these steps:

- install the MSI created by Advanced Installer

- open a PowerShell instance (as administrator)

- type:

Code: Select all

wmic
(Windows Management Instrumentation) and hit Enter.

- type:

Code: Select all

product get name,version
and hit Enter. This should list all the installed products. From the list, please pick up the name of your product.

- type:

Code: Select all

product where name="your_product_name"
and hit Enter. This will give pretty much all details from the package. From this, please pick up the IdentifyingNumber (the ProductCode)

- press CTRL+C to exit wmic

- type:

Code: Select all

gwmi -Query "SELECT Value FROM Win32_Property WHERE Property='UpgradeCode' AND ProductCode='{your_product_code}'" | format-table Value
This will give you the UpgradeCode of your product.

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vlbrgt
Posts: 12
Joined: Thu Jan 23, 2020 6:55 pm

Re: Upgradecode

Hello,

Thanks Catalin.
That worked perfectly.
Never been in the PowerShell, but this was a great help.

Regards
Etienne
vlbrgt
Posts: 12
Joined: Thu Jan 23, 2020 6:55 pm

Re: Upgradecode

One more little question :
Is it possible to show the result for product where name="My program name" in a more readable format (table, columns ....)
Thanks

Regards
Etienne
vlbrgt
Posts: 12
Joined: Thu Jan 23, 2020 6:55 pm

Re: Upgradecode

Thanks
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Upgradecode

Hello Etienne,
Thanks Catalin.
That worked perfectly.
Never been in the PowerShell, but this was a great help.
You are always welcome!

I am really glad this was of help for you.
Is it possible to show the result for product where name="My program name" in a more readable format (table, columns ....)
Yes, this is possible and, besides that, this does not require wmic (Windows Management Instrumentation) anymore. Here is how you can achieve this:

- open PowerShell

- type the following:

Code: Select all

$product = Get-WMIObject -ClassName Win32_Product | Where-Object Name -Match "Your_Application_name"
- after doing so, please type:

Code: Select all

$product | Format-List -Property *
This will show the properties in a much nicer format:
BetterFormat.png
BetterFormat.png (83.6 KiB) Viewed 5948 times

Hope this helps.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Upgradecode

Hello Etienne,

As a followup to my latest threads here:

Upon further investigations, I found a much easier way of achieving what you want (initially I have focused much more on the other questions and I completely ignored the main scope - which was to upgrade a package that was not created with Advanced Installer).

If I understood correctly, you simply want to upgrade another package that was not created with Advanced Installer. This can easily be achieved through our "Upgrades" page --> "Upgrades" section.

In this section you can specify other products that will be upgraded when your package will be installed. Note that these packages must be MSI-based, you cannot use this page to upgrade packages which don't use the Windows Installer technology. When you click the New... button Advanced Installer shows a dialog which allows you to select the target installation package from the disk.

Hope this will be of help for you.

Best regards.
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
vlbrgt
Posts: 12
Joined: Thu Jan 23, 2020 6:55 pm

Re: Upgradecode

Hello Catalin,
Thanks again for this reply. Very helpful.
I was only searching for the upgradecode for a msi created by Advanced Installer.
With your explanation this has been solved and I can make a msi (created with AI) that upgrades my project automatically.

Thanks
Regards
Etienne
Catalin
Posts: 7853
Joined: Wed Jun 13, 2018 7:49 am

Re: Upgradecode

You are always welcome, Etienne!

I am really glad I could help.

Best regards,
Catalin
Catalin Gheorghe - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Building Installers”