smacl
Posts: 5
Joined: Thu Dec 14, 2023 10:28 am

Using Save As to create a similar project bug

I have an existing project from which I wanted to create a similar project with different files and folders. I tried this by saving the existing project under a new name, changing all the details I wanted to change, and running rebuild all. This seems to work, but on running the installer, I find that old values for installation variables are used, specifically installation folder. See pictures attached
pic1.jpg
pic1.jpg (62.73 KiB) Viewed 10436 times
pic2.jpg
pic2.jpg (100.23 KiB) Viewed 10436 times
Testing the installer
pic3.jpg
pic3.jpg (33.96 KiB) Viewed 10436 times
I'm having to create a new project from scratch to get around this which is a pain.
smacl
Posts: 5
Joined: Thu Dec 14, 2023 10:28 am

Re: Using Save As to create a similar project bug

Solved it, and my error. Needed to generate a new product code to avoid confusion with the other product.
pic4.jpg
pic4.jpg (109.87 KiB) Viewed 10415 times
Liviu
Posts: 1419
Joined: Tue Jul 13, 2021 11:29 am
Contact: Website

Re: Using Save As to create a similar project bug

Hello,

Thank you for the follow-up.

I’m glad you found the cause.

Yes, when using Save As to create a similar but separate project, it is important to generate a new Product Code, UpgradeCode, and component GUIDs. Otherwise, Windows Installer may still treat the package as the same product or related to the previous one, which can lead to old cached values or installation state being reused.

Please take a look at the Efficient Project Duplication with Advanced Installer's 'Save as Template' Feature article.

For future similar projects, instead of using Save As or manually copying the .aip file, I recommend using File → Save → Save as Template. Then create the new project from New → Custom Templates.

This approach automatically generates new identifiers, including the ProductCode, UpgradeCode, and component GUIDs, which helps avoid conflicts between the original project and the new one.

Best regards,
Liviu
________________________________________
Liviu Sandu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”