GabrielBarbu wrote:place the Property Set with Formatted custom action as early as possible
As said earlier in this thread by Cosmin, changing the APPDIR property is
not effective 
. You should use the GUI Control Event
SetTargetPath, but this Control Event is
not available in quiet mode 
. To make things work
with AND without the GUI (quiet mode), you have to use the alternative for SetTargetPath that works in quiet mode: the Custom Action "
Directory Set with Formatted" for changing the Appliciation Folder (APPDIR).
The
universal solution for
upgrading to a new folder that works in GUI mode
AND in quiet mode

:
- Add a Custom Action "Directory Set with Formatted" to the "InstallInitialize" event.
- Choose the Application Folder (APPDIR)
- Set the value (Formatted Text): [ProgramFilesFolder][Manufacturer]\[ProductName] (or any other desired path)
- Execution Condition: NOT UPGRADINGPRODUCTCODE (this prevents the Custom Action to run during the uninstall phase of an upgrade)
As you see, you don't need to use "Property Set with Formatted" to change the value of APPDIR. Just use "Directory Set with Formatted".
FOLLOW US
Get the latest news in Application Packaging