Jump to content


This is a ready-only archive of the InstallSite Forum. You cannot post any new content here. / Dies ist ein Archiv des InstallSite Forums. Hier können keine neuen Beiträge veröffentlicht werden.
Photo

INSTALLDIR during Uninstall


4 replies to this topic

Sofia

Sofia
  • Members
  • 7 posts

Posted 11 May 2001 - 12:09

Hi!

I would like to give the user possibility to backup customized files during uninstallation. I have solved this by adding checkboxes to the "Redy to remove" dialog.
The problem is that I can't seem to get the right path to the files. I use MsiGetProperty to get the "INSTALLDIR" path but the path I get is the path I suggest at installation and it could have been changed by the user.
How do I get the actual path? There must be a command for this.

All help appreciated!
/Sofia


rflum

rflum
  • Full Members
  • 40 posts

Posted 15 May 2001 - 20:50

Hi, Sofia,
 You should be able to read the folder they installed to from the uninstall registry key, in a script function you run only when uninstalling.
 See "How To Get INSTALLDIR from Registry (for upgrading)" in the forum "Windows Installer (MSI) : General".
 Good luck!  Rob

Ian Blake

Ian Blake
  • Members
  • 483 posts

Posted 16 May 2001 - 09:37

Take care.  This information is not necessarily in the Uninstall key unless you have explicitly set ARPINSTALLLOCATION with a custom action.

Secondly components can be sent to different locations so you may find it easier to use MsiLocateComponent in a custom action to find the relevant components and files.


Irina

Irina
  • Members
  • 227 posts

Posted 16 May 2001 - 22:24

Hi,
You can set in registry key of your Product value like
"InstallDir  [INSTALLDIR]".
You can get this value during uninstall before RemoveRegistry and use it.