Windows Advanced Installer quiet mode upgrade use default APPDIR

  advanced-installer, windows

I’m creating an installer with "Windows Advanced Installer".

When I install the program on a different drive (like F:) the upgrade is working perfectly if the "exe" is executed with UI (double click on the "exe" file) but when I try to run it from a command line like so:

installer.exe /quiet /l*v installer.log

The installation is ignoring the fact that it is installed in F: drive and install again on C: drive.

I have looked at the log output in both cases and can see that when the installer executed in "quiet mode" does not set the TARGETDIR to the current volume:

UI installation log:

MSI (s) (7C:48) [11:46:37:203]: PROPERTY CHANGE: Modifying TARGETDIR property. Its current value is 'C:'. Its new value: 'F:Program Files****'.

Console installation log:

MSI (s) (44:C8) [20:56:43:404]: PROPERTY CHANGE: Adding TARGETDIR property. Its value is 'C:Program Files****'.

I do have the "Use original installation path when upgrading" set.

Source: Windows Questions