views:

30

answers:

2

I'm not sure what happened, but my installer is in a weird state--when I install my MSI, it doesn't seem to be running the current version of the code (I'm using Custom Actions). I verified it by placing some MessageBox.Shows and sure enough, they are not popping up.

It's possible I may have had a few unsuccessful installs previously which may have put the installer in a bad state...but how do I go about resolving this?

Thanks...

+1  A: 

You shouldn't expect MessageBox.Show to work in a .NET custom installer action. Those actions run in the context of the Windows Installer service, which doesn't run on the interactive desktop. Try logging to the event log (or any other I/O operation that doesn't depend on the current windows desktop and doesn't require an administrative or current-user security token) if you want to debug your custom action.

David Gladfelter
It works..in fact my old MessageBox.Shows do popup up...I use MessageBox.Shows to debug my installer.
Prabhu
@Swami - are you developing on an XP machine but deploying/experiencing this problem on a newer OS?
overslacked
I'm developing on Windows Server 2008 virtual pc
Prabhu
+1  A: 

If you think you are running older copies of your .msi code, the best way to resolve it is to delete all files from your %temp% directory (type "%temp%" in the windows explorer address bar and you'll see the contents of this directory and delete everything, then try again.)

Damien
Thanks, I'll have to try that next time!
Prabhu
There's an option to create a new UpgradeCode and ProductCode. What effect does this have? When is it best to generate these new codes?
Prabhu