Check registry before upgrading? - Advanced Installer Community

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!

kkim
Posts: 44
Joined: Thu Apr 12, 2007 3:58 pm

Check registry before upgrading?

Hi,

I'd like to have a license key that will also contain the date of expiration.

Is it possible to include a C++ program within the installer so that before it upgrades, it first checks this registry
to see if the date has expired? This way users won't be able to upgrade..

I'd like to provide a C++ sourcecode within the installer so that it will read the license key and return a TRUE or FALSE
value.

If TRUE, upgrade....if FALSE then the installer says, "Your warranty has expired...."

Also are there any security issues by including our C++ sourcecode program within the installer?
Cosmin
Posts: 5797
Joined: Tue Jul 10, 2007 6:39 pm
Contact: Website

Re: Check registry before upgrading?

Hi,

What you need can be done by using a C++ DLL as an installer custom action. Based on the result of the check, this DLL can show a custom message to the user and abort the installation. The installation can be aborted by returning an error code from the custom action (for example "ERROR_INSTALL_USEREXIT").
Also are there any security issues by including our C++ sourcecode program within the installer?
If the custom action only reads information, then there are no problems. However, if you need it to modify resources the installation may need to run with Administrator privileges (this depends on the resources you need to modify). Other than that, C++ DLL custom actions are recommended for features not supported by Windows Installer.

Regards,
Cosmin
Cosmin Pirvu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
kkim
Posts: 44
Joined: Thu Apr 12, 2007 3:58 pm

Re: Check registry before upgrading?

cosmin wrote: If the custom action only reads information, then there are no problems. However, if you need it to modify resources the installation may need to run with Administrator privileges (this depends on the resources you need to modify). Other than that, C++ DLL custom actions are recommended for features not supported by Windows Installer.
Thanks Cosmin,

The DLL would only read and provide either true or false return value. So this sounds like the best path to go....

I will do further reading on custom actions..

Thanks!

Return to “Common Problems”