Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to run my own C++ source files in the installation wizard?

I have created a windows install deployment for my C++ application using VS2010. However my problem is that I don't know how can I squeeze in some of my own code to the installation wizard (and is it possible at all?). The problem is that during installation I want:

  • ask the user to provide his installation key,
  • grab the hardware fingerprint (I already have an algorithm for that with WMI),
  • sent both keys using my own c++ communication libraries (so NOT the browser),
  • continue the installation after receiving a confirmation from the server.

Moreover, this would require adding custom items to the installation wizard like the input field for installation key, or pop up boxes witch error warring like:

Couldn't connect to the server. Please check your internet connection before continuing with the installation.

So it's in fact a 2 level question:

  • How to run my C++ source files during the installation wizard?
  • How to add custom element to the installation wizard GUI?

So far it has been hard to find anything helpful in Google. :/

like image 791
srd.pl Avatar asked Nov 30 '25 17:11

srd.pl


1 Answers

Check Windows Installer, more specifically Custom Actions:

The developer of an installer package may write code to serve their own purpose, delivered in a DLL. This can be executed during the installation sequences, including when the user clicks a button in the user interface, or during the InstallExecuteSequence. Custom Actions typically validate product license keys, or initialise more complex services. Developers should normally provide inverse custom actions for use during uninstallation.

Msiexec provides a way to break after loading a specified custom action DLL but before invoking the action.

like image 105
karlphillip Avatar answered Dec 03 '25 08:12

karlphillip



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!