Mert
Posts: 50
Joined: Mon Jun 15, 2009 4:00 pm

Running a .reg file and creating directory under C:\

Tue Jul 21, 2009 7:00 am

Hi for my project I need to run a reg file and enter some data to registry that way is there a custom action for this that I can use? Also I need to install some of my files to C:\ directory instead of program files and I couldn't figure out how to do that so anyone can help me?

Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact:  Website

Re: Running a .reg file and creating directory under C:\

Tue Jul 21, 2009 7:34 am

Hi,

For creating a registry you can use the Registry page. Here you can add, remove, rename, move and import registry keys.

For installing files on C:\ you must go to Files and Folders page. Here select WindowsVolume from the folder tree and then add files as you did in the Application Folder.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Mert
Posts: 50
Joined: Mon Jun 15, 2009 4:00 pm

Re: Running a .reg file and creating directory under C:\

Fri Jul 31, 2009 7:10 am

OK I can add registry keys there but I am using a checkbox in the installer for user to make choices about installation and if this checkbox is checked I need to add this reg file otherwise it shouldn't be installed is there a custom action for this?

Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact:  Website

Re: Running a .reg file and creating directory under C:\

Fri Jul 31, 2009 9:54 am

Hi,

Here is want you can do. Add your registry to File and Folder page and go to Custom Actions page. Here, on Install add a Launch File or Open URL with the Command Line field set like this:

Code: Select all

regedit.exe /s "[#Your_Reg_File.reg]"
Where Your_Reg_File.reg is the name of your registry. This command will make the registry to install silently.

To condition the install of the registry by the checkbox just go to Expression field from the custom action and set it like this:

Code: Select all

MY_CHECKBOX="yes"
where MY_CHECKBOX is the name of your checkbox property.

Also set the checkbox properties like this:
- Property Name: MY_CHECKBOX
- Value : yes

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”