vonix19
Posts: 3
Joined: Mon Apr 03, 2006 4:31 am

Copy Custome File From Install Directory

Hi,

I just down load AI and successfull build a MSI package. The application is very easy to use. The only question I have is, can AI run external registry file? Can AI copy an external config file? Another word, when I distribute my MSI I would like my client able to customize the registry file and config file to fit their need. These two file will reside in the same directory as the MSI file. The name of the two file are custom.reg and custom.cfg.

Vonix19
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,

What you are trying to do could be achieved with the use of three custom action. The first custom action could execute a Script and copies the config files to the target location. The second CA could run the registry file. To do this you could lauch regedit.exe with the following command line:
regedit.exe /s path of .reg file

The third custom action could also use a Script file to remove the config file and the registry entries upon uninstall.

For more details on custom actions please see the Advanced Installer help page or visit the following URL location:
http://www.advancedinstaller.com/user-g ... -page.html

Best regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com
vonix19
Posts: 3
Joined: Mon Apr 03, 2006 4:31 am

Hi ciprian,

I did create a custom action and use regedit.exe /s .reg file but all I get is the command promt. Is there a variable that I can use to specify the path where the msi install from. All of our client use ADS to push out the package to their PC therefor the path is not static and they don't want to copy the .reg file to each machine.

Thanks

Vonix19
ciprian
Posts: 259
Joined: Thu Jul 14, 2005 12:56 pm
Location: Craiova, Romania
Contact: Website

Hi,

The location o of the MSI file is stored in the "SourceDir" property. You can insert a reference to this property when you specify the location of the REG file.

The text from the "Command Line" field would be something like:

Code: Select all

/s [SourceDir]myfile.reg
Best regards,
Ciprian
Ciprian Burca
Advanced Installer Team
http://www.advancedinstaller.com

Return to “Common Problems”