dgboone
Posts: 12
Joined: Tue Apr 14, 2009 3:20 pm

Editing text file during install

In my installation I have a text file which needs to contain the path of the installation. Of course I do not know the PATH until the user chooses where to install. Is there some easy/recommended way to be able to edit this file during installation to replace some arbitrary string with the actual install path?
Bogdan
Posts: 2796
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: Editing text file during install

Hi,

Here is an article that could help you. The installation path of a package is stored in the public property APPDIR.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
dgboone
Posts: 12
Joined: Tue Apr 14, 2009 3:20 pm

Re: Editing text file during install

Hi,

Thanks for the suggestion.

This sort of works. I am able to create the action and during installation the file gets modified.

However, when I try to uninstall by clicking "Remove" in "Add or Remove Programs" then I get an error: "There is a problem with this Windows Installer package. A script required for this install to complete could not be run. Contact your support personnel or package vendor"

If I choose "Change" instead of "Remove" it works and I can then use the "Remove" option of the installer itself. However just clicking "Remove" must work as well.

The is with Windows Server 2003 x64.

I followed the instructions from the link you provided so I do not think I am doing anything wrong. Do you have any explanation for this behavior?

Dwayne
dgboone
Posts: 12
Joined: Tue Apr 14, 2009 3:20 pm

Re: Editing text file during install

Sorry, this error was cause by some unrelated action, please ignore.

Return to “Common Problems”