Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
| Search | Today's Posts | Mark Forums Read
C# 2005 For discussion of Visual C# 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 6th, 2006, 02:27 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to MadJac
Default how to Uninstall a service

ok, well i figured out how to install a service.

but how do uninstall it. incase a users wants to uninstall and re-install the service

i use a setup project to install it. now i need tobe able to uninstall.

when i run the uninstaller it removes the files and leaves the entry in the "control panel"->"services" controller.

 
Old December 6th, 2006, 03:02 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

To "register" the service:
%windir%\Microsoft.NET\Framework\v2.0.50727\Instal lUtil.exe ServiceName.exe

To "unregister" it:

%windir%\Microsoft.NET\Framework\v2.0.50727\Instal lUtil.exe /U ServiceName.exe

Note that unregistering it is different from uninstalling it....

HtH,

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.
 
Old December 6th, 2006, 11:14 AM
Registered User
 
Join Date: Dec 2006
Location: , , .
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to MadJac
Default

isn't there anyway to unregister it in a program using code and not having to use the console todo it?

if your createing a professional program that uses a service you want the program tobe able to do the work not to have the end users have todo it.

i know about "installutil" but frankly it's kind of a dumb way todo things when the program is suppose todo it

 
Old December 6th, 2006, 11:48 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

You could wrap the call to InstallUtil.exe in your custom installer.

I think when you have a professional installer package, you can execute custom tasks.

Don't know of any other way; sorry...

Imar
---------------------------------------
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Everyone is unique, except for me.
Author of ASP.NET 2.0 Instant Results and Beginning Dreamweaver MX / MX 2004
Want to be my colleague? Then check out this post.




Similar Threads
Thread Thread Starter Forum Replies Last Post
MySQL - Uninstall Fix MySQL 2 April 12th, 2006 02:53 AM
Uninstall BETA's first Robert Reno BOOK: Beginning ASP.NET 2.0 BOOK VB ISBN: 978-0-7645-8850-1; C# ISBN: 978-0-470-04258-8 3 February 14th, 2006 12:50 PM
MSDE Uninstall Doesn't jeffg22 SQL Server 2000 11 September 15th, 2004 09:11 AM
how do you uninstall php5? cardme42 BOOK: Beginning PHP, Apache, MySQL Web Development ISBN: 978-0-7645-5744-6 1 September 2nd, 2004 09:42 PM
How to fully UnInstall the VS .Net? Estuardo VS.NET 2002/2003 0 September 8th, 2003 10:41 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.