We help IT Professionals succeed at work.

Visual Studio setup project - handling uninstall discrepancy during upgrades

vizagboy
vizagboy asked
on
1,082 Views
Last Modified: 2013-11-26
Follow up to "Visual Studio setup project - handling Version number and ProductCode " question. Waiting for any information from the newsgroups to which vadimrapp1 posted.
Comment
Watch Question

Author

Commented:
Having issues adding the uninstall custom action to the primary output.
CERTIFIED EXPERT

Commented:
here's suggestion from Phil Wilson in newsgroup:

http://support.microsoft.com/?id=906766

However, when I tried it, it did not help. I didn't fully understand that article - see my reply in the newsgroup.
CERTIFIED EXPERT

Commented:
the link is
news://msnews.microsoft.com/

(the EE parser apparently knows only http)

Author

Commented:
I got sidetracked with another issue which i am working on. I have read the article and am going to try tomorrow.

Author

Commented:
There is one more reason why I had to overwrite the OnBeforeUnInstall handler besides the config files backing up. I added the logic in application to backup the config's though and is taken care.
In my application i have two EXE's. One is normal C# windows app and another is Windows service. I had to add the output of service's exe to the uninstall custom function. Otherwise during the upgrade, it says Service already exists and is aborting the upgrade. Any alternatives for this?
CERTIFIED EXPERT

Commented:
Not long ago, answering another question here, I created in VS windows service project with installation and upgrade, and it was working flawlessly. Uninstallation correctly stopped the running service and then deleted it. Upgrade stopped it, upgraded, restarted. I suggest you try it on separate project with service only, see how it works, then work on making it work with your main exe. Maybe you need to have separate project for the service, and therefore adding it to the setup as Primary Output. And of course, the executable must have higher version than the one it's upgrading.

Author

Commented:
I have the service running as a separate executable. I can try that. I will be able to do it in the evening. Will get back to you with the results. Thanks!
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
yep, agree with you. learnt it the hard way :-)
i am going to look towards writing in vbscript and wire them in prebuild and postbuildevents. that should suffice.
Thanks for the feedback.
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.