travsey
30th March 2008 09:11 UTC
Vista uninstal
I am attempting to convert some installers to be vista compatible. I am running into an issue where my uninstaller will not delete Applications (.exe) and extensions (.dll). These installers worked ok in previous versions of windows.
So before the obvious reply is given, I have "RequestExecutionLevel admin" at the top of my script and "SetShellVarContext all" where appropriate;)
Basically, when a file is installed (in a loop), the installer records it in the registry using:
WriteRegStr HKLM "${REGISTRY_FILES}" "file$COUNTER" "$TARGET_PATH\$1"
When uninstalling, the uninstaller loops through the registry and removes the registry, then the file:
ReadRegStr $FULL_PATH HKLM "${REGISTRY_FILES}" $UNINSTALL_FILE_IDENTIFIER
DeleteRegValue HKLM "${REGISTRY_FILES}" $UNINSTALL_FILE_IDENTIFIER
Delete $FULL_PATH
When I look back at the registries, the registry entries have been removed but the files remain. However other file types (.txt, .xml) are removed. This leads me to think that I may need some additional privileges to remove these files.
I am using XP SP2 and NSIS v2.36.
I've been able to fix my other vista issues thanks to this forum, but unfortunately this one has had me scratching my head for the better part of the weekend:cry:
mauvecloud
30th March 2008 15:16 UTC
Is it possible to remove these .exe and .dll files by hand afterwards, or does it give you an error message, such as saying they're still in use?
travsey
30th March 2008 22:00 UTC
They can be manually deleted afterwards in windows explorer.
The uninstaller does not show any errors or warnings when executing.
Thanks
l0k1
2nd April 2008 16:14 UTC
If files are protected by Vista, have you try looking at :
C:\Users\"user_name"\AppData\Local\VirtualStore\Program Files ?
travsey
3rd April 2008 08:58 UTC
Sorry l0k1 I'm not sure what you are getting at, can you please clarify?
Any ideas anyone? I am still scratching my head over this:(
l0k1
3rd April 2008 09:28 UTC
(sorry for bad english)
For compatibility purpose, under Windows Vista, when processes try to write into protected directories like "c:\program files" without elevation rights, files are written in a virtual directory located at "C:\Users\user_name\AppData\Local\VirtualStore".
Another possible reason may be if your application is still running -> kill process before uninstalling.
travsey
23rd April 2008 08:37 UTC
Well, I'm an idiot!
Turns out I needed "RequestExecutionLevel admin" at the start of my uninstall macro, not just at the start of the script.
Thanks to everyone for your help:)