Archive: Remove all Directories


Remove all Directories
I have my install working correctly now and I was testing the un-install. Some of my files go into the $INSTDIR but others go into various directories gathered from the user during the install. These directories are represented by the variables $2, $3, $4, and so on. What I would like to do is to removed each of these directories and the information contained within them on the uninstall using something like RMDir /r $3. I tried this with the install and the directory was not removed. Is there anyway to have the Install store the values of these variables and restore them on uninstall to remove the directories?

Thanks in advance,

Beez


If you want to delete the entire directory just use RMDir /r $INSTDIR. If you want to delete just those specific directories stored in $2, $3 and $4, save them to the registry and read them in the uninstaller. Then use what you have read from the registry to delete those specific directories. Don't forget to make sure that you have actually read something from the registry (use IfErrors or StrCmp "" $[reg-value]).