guilhem.martin
9th February 2006 10:19 UTC
Uninstall: deleting only installed files
Hello all,
till now I'm using "RMDir /r" during the uninstall process to delete the install directory.
The problem with that is if the user stores some data in the folder, it will be lost by uninstall.
Is there an automatic way to remove only those files which have been installed and leave the others there?
Any help welcome,
thanks,
Guilhem.
onad
9th February 2006 11:35 UTC
Ofcource, individually dlete the files, then to a RMDIR.
Not that RMDIR can be used without R then it deleted the folder only if it is empty.
See snip example below:
;When installing APP it's in StrCpy $INSTFOLDER "$PROGRAMFILES\$CompanyRootFolder\$TargetMarketMainFolderGlobal\$MainFolder"
; Remove files and uninstaller individually
Delete /REBOOTOK "$INSTFOLDER\MYMAIN.EXE"
Delete /REBOOTOK "$INSTFOLDER\extra.dll"
Delete /REBOOTOK "$INSTFOLDER\uninst.exe"
Setoutpath "$PROGRAMFILES"
RMDir /REBOOTOK "$PROGRAMFILES\$CompanyRootFolder\$TargetMarketMainFolderGlobal" ;only deletes if there are no more applications is sub folder
RMDir /REBOOTOK "$PROGRAMFILES\$CompanyRootFolder" ;only deletes anyhow if there are no more old other3rd party applications
guilhem.martin
9th February 2006 15:14 UTC
Thanks a lot guys.