Page 1 of 1
How to debug uninstall?
Posted: Tue Aug 14, 2007 10:54 pm
by tikard
What do you have to do to start the uninstall under the debugger. I am trying to delete files just after the uninstall is processed but it does not work. Is there a place you pass in flags or what do I need to do to see the uninstall script/process under the debugger?
Posted: Wed Aug 15, 2007 12:54 am
by pfennig
Basically you do the same as for the install process. Set a few break points and start the debug mode.
Re: How to debug uninstall?
Posted: Fri Dec 17, 2010 4:01 pm
by ParallaxiT
I am also trying to figure out why my files and registry settings are not being un-installed. I install using debug mode and i can step through no problem. But how do i start the uninstall process. If i click debug it just upgrades the program but never hits the Apply Uninstall section.
Any help?!
Thanks!
Re: How to debug uninstall?
Posted: Fri Dec 17, 2010 6:20 pm
by mills
In your project settings, you can specify whether or not the revision code will automatically be generated each build. Uncheck that and you should observe the behavior you want.
Re: How to debug uninstall?
Posted: Mon Dec 20, 2010 10:44 am
by ParallaxiT
If I uncheck that setting, what do i click next to fire the uninstall. I am not in front of my machine right now so bear with me, I know i have a Start Debug button which starts the installer. Do i press that once it is installed (in debug mode) and because i did not change the revision code as you mentioned, it will start the uninstaller?
Re: How to debug uninstall?
Posted: Mon Dec 20, 2010 11:53 am
by giaviv
Dear ParallaxiT,
Exactly. Try it out and let me know how it works for you.
Best,
Aviv Giladi
InstallAware Support
Re: How to debug uninstall?
Posted: Mon Dec 20, 2010 2:12 pm
by ParallaxiT
OK, here is what I did.
1. Deployment Type - UnCompressed Directory Layout
2. Debug Build - Checked
3. Compression - None
4. Output - unchcecked 'Change revision code automatically'
5. I then click Build - CD or DVD and it compiles and builds my setup in debug mode correctly
6. I then click on the Debug icon to allow me to step through the installer, works correctly and i can step all the way through to complete.
7. I click on Debug again and all it does is go through a quick re-install. Never hits any uninstall code
So what am i missing? Thanks for the quick help too!!
If this is quicker, the reason i am trying to debug is that on uninstall not all the created folders are being deleted. I use the following code. Tried before and after the Apply Uninstall command but no effect. I can't even find where the REMOVE variable is set in the MSI code.
Cheers
Re: How to debug uninstall?
Posted: Mon Dec 20, 2010 11:34 pm
by giaviv
Dear ParallaxiT,
I just tried the steps you are describing and it works for me. What happens is that the second time you run the installer in debug mode, a window comes up that gives you an option to either modify, repair or uninstall your program. Make sure you are not missing anything - your "change revision code automatically upon rebuild" checkbox has to be unchecked, and your software has to be fully installed (while the checkbox is unchecked) before you can debug the installer. Let me know how this works out for you.
Regards,
Aviv Giladi
InstallAware Support
Re: How to debug uninstall?
Posted: Tue Dec 21, 2010 8:51 am
by ParallaxiT
It makes total sense and i bet I know why mine fails to do the uninstall. I modified my installer to not advertise (i think thats what its called), and not show the majority of windows upon install. I guess I need to re-enable the dialog which prompts the user for the options you mentioned. I will try that this morning and get back to you.
On a side note, did you have any ideas why my files do not get deleted upon uninstall as i mentioned in the previous post and screenshot? I think once i can debug a may get some error messages but if not it will be my next question. I can start a new post if you do not want cross-question postings to occur.
Cheers Mate for the help!!
Re: How to debug uninstall?
Posted: Tue Dec 21, 2010 9:17 am
by giaviv
Dear ParallaxiT,
It can really be anything - perhaps you got the file names wrong, or maybe the files are in use and therefore cannot be removed. Please try to debug the uninstall process, it will probably be a lot more helpful than my guesses

Please let me know if that helped.
Regards,
Aviv Giladi
InstallAware Support
Re: How to debug uninstall?
Posted: Tue Sep 13, 2011 2:59 pm
by carlos
I am having this problem too. If I run the installer from the Add-Remove programs or call a short cut we have in the start menu to initiate the Uninstallation, a folder with a name "~0" remains in the $APPLICATIONDATA$ folder. The reason being that a folder with A GUID is kept in the $APPLICATIONDATA$ folder that contains a copy of the installer that is run from the Add-Remove programs or short cuts, this folder cannot be deleted because it is still in use, so I end up with a folder ~0 at the end of the installation. Anyone found this problem and gotten around it?
Re: How to debug uninstall?
Posted: Tue Sep 13, 2011 3:05 pm
by giaviv
carlos,
Does restating the machine resolve the issue?
Re: How to debug uninstall?
Posted: Tue Sep 13, 2011 3:55 pm
by carlos
Yes it removes these folders. They must be marked for removal by the OS then. My team is happy with that, thanks.
Re: How to debug uninstall?
Posted: Wed Sep 14, 2011 5:30 pm
by giaviv
Great!