Click here to Skip to main content
Rate this: bad
Please Sign up or sign in to vote.
See more: C++ Windows
There is there is this set of windows application that I developed and need to develop an installer for them such that users can select whether they wish to install one or more of the application just as it is done in Microsoft Office. At first I wrote a custom action dll to add to the project as a custom action, unfortunately, the single dialogue box for making selections of project to install did not work, because I had no means of passing an INSTANCE to it(HINSTANCE is the first parameter of DialogBox function) so I decided to use an executable instead of a dll.I wrote a windows application instead. This executable worked. I simply call MsiInstallProduct function for every selection made by user. However, when I added the executable as a custom action to the setup project, the installer will proceed, run my executable but later report that the executable did not finish execution. Once I click Ok, the installer rolls back.

What could be the problem and what could be the likely solution. Is that my executable is returning the wrong value. I usually return ERROR_SUCCESS on success.
Or could it be that it is because I am attempting to do an installation while another installation is going on?
I don't know this Msi approach that uses XML and feature table.
If this problem defies solution,I am thinking of using the MSI/XML approach. Could anyone tell me where I can get a sample(or better still a customizable XML/MSI template code) MSI/XML code that I can adapt to suit my purpose.

What I wish to do is to give users a means of selectionone or more options of applications to install and then install the user selection. I probably will need a feature table.( I don't really know these TABLES stuff).

In the extreme case, I don't mind using another installer is easy to use and can give me this capability.
Enhzflep: removed words I need urgent help with from the title, in the interests of having more attention afforded the question
Posted 8-Oct-12 7:09am
Edited 8-Oct-12 8:34am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

An installer is organized as features.
Each feature would be an application that you wish to install.
Each feature would contain several components.
A component may be a file or registry key.
Each component can have a key file that is automatically installed if removed or damaged.
So basically what you would do is create several components and then map the features to use one or more components.
Read more about it here -[^]

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Maciej Los 450
1 OriginalGriff 403
2 Sergey Alexandrovich Kryukov 195
3 CPallini 189
4 CHill60 180
0 OriginalGriff 6,092
1 Sergey Alexandrovich Kryukov 4,958
2 Maciej Los 3,269
3 Peter Leow 3,129
4 DamithSL 2,490

Advertise | Privacy | Mobile
Web01 | 2.8.140721.1 | Last Updated 9 Oct 2012
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100