How to get and save user input during installation using Advanced Installer?
- Admin
- 2016-07-16 12:42:03
- 5,048
This simple and easy to follow tutorial will guide you to how to get and save user input during installation from your program-software in Registry using Advanced Installer.
Here are few steps to do that.
Creating a new project in Advanced Installer
- Open Advanced Installer on your computer.
- Click New -> Project Type Installer and then from Generic Templates select Enterprise
- This will open up setup creation interface. Change Program Name And Company Name according to your needs.
Adding new custom dialog
- Now the real part: select Dialogs from side bar and then select FolderDlg.
- After selecting FolderDlg in above step some options will be enabled on same window, select New Dialog option from them, this will add new dialog in our program.
Designing dialog in Advaced Installer
- Right click on blank space on dialog and select Control ToolBox
- This will open up control toolbox that we will need to add control on newly created dialog.
- Now we need to add few controls on this dialog according to our needs. Let's say we need a Name and Email from user then we will need following controls added on our Interface.
Control Name GroupBox ANY_NAME Label1 for Name ANY_NAME Label2 for Email ANY_NAME TextBox1 for Name NAME TextBox2 for Email EMAIL
How to change Control Name correctly?
- To change control name, select the control, this will open it's properties.
- Now under Property Section change Property Name.
- Repeat above step for all the controls.
- Note: Name should be only in CAPITAL LETTERS.
Setting Registry values in Advanced Installer
This is most important step because this will save user entered values in computer's Registry. So how to do it?
- Open Registry section from side bar in Advanced Installer, you can type 'Registry' n serchbox and find it quickly.
- This will open up Registry section. Now select [HKEY_CURRENT_USER] -> [ProductName]
- Now right click and click New Value, this will open Edit Registry Entry dialog.
- Now change Name: and Click Property button on it, this will open Select a property dialog.
- On Select a property click ->User Interface -> SelectName
- Similarly for Email repeat above 5 steps and at last click ->User Interface -> Select Email
- Now compile the setup and install it and then open Registry on your computer by typing "regedit" on windows search.
- Navigate to [HKEY_CURRENT_USER] -> Software -> [ProductName] you will get entered values.