Archive: MUI_UNPAGE_CONFIRM folder variable?


MUI_UNPAGE_CONFIRM folder variable?
  Because my installer has installed program components to INSTDIR and application data to APPDATA I would like to issue a second Uninstaller Confirm page, the second with APPDATA, actually $MyAppData, substituted for INSTDIR.

It appears that INSTDIR is fixed and I cannot see any option to substitute my own variable for it.

In the MUI_PAGE_DIRECTORY macro, used during the install phase there is a way to present a user specified directory using:

!define MUI_DIRECTORYPAGE_VARIABLE $MyAppData

Is there such a possibility for use with MUI_UNPAGE_CONFIRM?


NSIS does support this:


PageEx /*un.*/uninstConfirm

DirVar $myuninstConfirmDir
PageExEnd
>
but it looks like the MUI forgot about it, you should file a feature request...

You could probably work around this by using MUI_PAGE_CUSTOMFUNCTION_* to save and restore $instdir

I submitted the feature request for you; https://sourceforge.net/tracker/?fun...49&atid=373088


Actually with Vista and Windows 7 making it typical to install program files and application data in $INSTDIR and $APPDATA (or similar) it would be useful to have MUI_PAGE_DIRECTORY to offer the option for two 'directory entries' rather than the current single entry, as well as MUI_UNPAGE_CONFIRM offering two 'directory entries'.

Carrying this further an AppDir and AppDirRegKey analog to InstallDir and InstallDirRegKey would be valuable.


I don't think that's a good idea. You shouldn't ask users too much information, because 90% of them won't know what to answer. AppData is designed to store small user/configuration files, so just use it. (If the files you're storing in AppData are so big that the user might run into HDD space problems, you need to rethink the storage scheme of your application.)


Originally posted by Ron.Stordahl
Actually with Vista and Windows 7 making it typical to install program files and application data in $INSTDIR and $APPDATA (or similar) it would be useful to have MUI_PAGE_DIRECTORY to offer the option for two 'directory entries' rather than the current single entry, as well as MUI_UNPAGE_CONFIRM offering two 'directory entries'.

Carrying this further an AppDir and AppDirRegKey analog to InstallDir and InstallDirRegKey would be valuable.
You are mixing all users and single user install locations. If you are elevated and install into $programfiles you should not write to $appdata. If your application uses the files in $appdata as the template for something then you should change it so that you install this template data in $PROGRAMFILES\myapp\template or $COMMONFILES\myapp or the all users appdata and then copy the data to %AppData% in your application the first time it runs.

Or to put it another way; User1 installs to $ProgramFiles and $Appdata, then User2 comes along and their $AppData is empty, how do you deal with this?