Announcement

Collapse
No announcement yet.

Uninstall question

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Uninstall question

    When you install your application, it creates uninstall data files that tells the uninstaller what to do.

    If you install a later version of your application that may or may not contains the exact same items, does the new installation take into consideration the previous uninstall data files when it creates the new uninstall data file, or does it just overwrite the existing uninstall data files with information about the new installation?

  • #2
    Originally posted by calbert View Post
    If you install a later version of your application that may or may not contains the exact same items, does the new installation take into consideration the previous uninstall data files when it creates the new uninstall data file, or does it just overwrite the existing uninstall data files with information about the new installation?
    You are free to decide how you want this to happen.

    If you want to merge the previously deployed files with the new files, and have them uninstalled all together when the uninstaller is run, then you need to verify this setting:
    Click image for larger version

Name:	SCRN-2015-04-24-01.png
Views:	1
Size:	40.7 KB
ID:	284301
    With the "Overwrite data file" not set, the new uninstall data will be merged with the old data. This means, new files will be added to the existing list of files to be removed when the uninstaller is executed.

    You can see this by inspecting the installation log files. When the setting is set as shown above, you'll find this:

    Code:
    ...
    [04/24/2015 11:31:06] Success	Set uninstall data folder: C:\Program Files\Your Product\Uninstall
    [04/24/2015 11:31:06] Success	Set uninstall config file name: C:\Program Files\Your Product\Uninstall\uninstall.xml
    [04/24/2015 11:31:06] Success	[highlight]Uninstall config file merging[/highlight]
    [04/24/2015 11:31:06] Success	Create uninstall data folder: C:\Program Files\Your Product\Uninstall
    [04/24/2015 11:31:06] Notice	Uninstall executable already exists: C:\Program Files\Your Product\uninstall.exe
    ...
    If you check the "Overwrite data file" option, then the previous version of the list of files, folders, shortcuts etc. will simply be overwritten, and replaced with the data of the latest install. This means that after an uninstall, you may have orphaned files left over in the system, if those items weren't also part of the latest installer.

    Ulrich

    Comment


    • #3
      Thanks.

      My real problem is how to deal with shared dll's. The shared file count is not accurate and my uninstall ends up leaving orphaned files. Some of the dll's are registered and some are not. When the shared file count is reduced to zero, in some cases I get the message "File in use and I can click the 'Ignore' button to have the file removed on the next re-boot. The problem with this is that the file is not in-use and I have hundreds of these files where you need to click the 'Ignore' button hundreds of times.

      Can I do something in the registry like delete the shared file count entry in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\CurrentVersi on\SharedDlls, Unregister the file when necessary, and then delete the file?

      Or, in the uninstall pre-uninstall, delete the shared file count entry in the registry, and then let the uninstaller do it's job to get the files removed?

      Comment


      • #4
        I believe that you could do that. If you are sure that these files are indeed not being used by another application and deleting them won't cause issues, then you could loop over the table of files retrieved by UninstallData.GetItemList(), compare those entries with the files registered as SharedDlls, and remove the matching entries as desired...

        Ulrich

        Comment

        Working...
        X