Search This Blog

Monday, April 4, 2011

Step by step guide to Update Setup Project Wizard UI


By default the Windows installer created by a setup project has some default instruction strings and banner images for the setup. Many times we are required to add their own custom User Interface in the Wizard. If you need the same there’s the way.

Step One :
Add a new project of Setup project template type.

 
A file system window of setup project will appear


 

Step Two: 
To add their custom UI to the Wizard right click the created setup project -> View -> User Interface.



This will prompt us the User Interface of setup project where we can add their own UI.



Follow the below steps to add their own dialogs and controls.









For detailed description of these properties follow the link:
Notice the Edit1Property property. This specifies a property name that is used to retrieve the text entered in the first text box.
http://msdn.microsoft.com/en-us/library/e04k6f53.aspx

Step Three:

Now we need to add custom actions where we will fetch the input value of our custom wizard page control and will do our desired task. In my case I am using that value to make a entry in registry. Add a new project of Class Library type.



Delete the class1.cs


Add a new item of “Installer class” type to the class library project





Notice that our newly created installer class inherits from Installer class.
Now we need to override the Install method of Installer class.  In this method I am fetching the custom wizard page controls value from “EDITA1” parameter which we fixed earlier while creating Wizard UI.

Now all you need to do is to just check Right click Setup Project -> Install. A wizard will start where you will get a new custom wizard page and you are done with custom wizard UI.
To download the source code follow this link : http://min.us/mvb9WwN

No comments:

Post a Comment