Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2005 > C# 2005
Password Reminder
Register
| FAQ | Members List | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
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.

  #2 (permalink)  
Old December 6th, 2006, 03:02 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 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.
  #3 (permalink)  
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

  #4 (permalink)  
Old December 6th, 2006, 11:48 AM
Imar's Avatar
Wrox Author
Points: 72,073, Level: 100
Points: 72,073, Level: 100 Points: 72,073, Level: 100 Points: 72,073, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,587 Times in 1,563 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.
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 04:55 PM.


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