ihsiu1
Posts: 17
Joined: Tue Feb 21, 2006 4:36 pm

Is there a way to change the APPDIR on the fly?

Hi,

Is there a way to change the APPDIR on the fly? Say, if I like to retrieve and use the previous installation folder instead of the default one?

I tried my custom actions at <PrepareDlg> under <InstallUISequence> and failed.

Thanks,
ihsiu
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi,

There are actually several ways:
1. You can set "APPDIR" on the command line:

Code: Select all

msiexec /i package.msi APPDIR="C:\Some folder\"
2. You can use a Property Set with Formatted CA:
- Property Name : APPDIR
- Formatted Text: C:\Some folder

3. You can use a Script Inline CA:

Code: Select all

Session.Property("APPDIR") = "C:\Some folder"
4. You can use a Registry Search named APPDIR in order to retrieve the path that was saved there by a previous version of your application. See the following thread:
http://www.advancedinstaller.com/forums ... php?p=2842

Both methods 2 and 3 work fine when the CA is scheduled on the "InstallUISequence -> PrepareDlg" Standard Action. What type of Custom Action have you used and what are its properties (Execution Condition etc)?

Note that the packages created with the next version of Advanced Installer will automatically detect the previous installation folder.

Regards,
Denis
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”