> 
> From: Andy Smith <[EMAIL PROTECTED]>
> Date: 2004/10/04 Mon AM 12:13:45 EDT
> To: [EMAIL PROTECTED]
> CC: [EMAIL PROTECTED],   [EMAIL PROTECTED]
> Subject: Re: un-install should unregister services
> 
> 
> 
> [EMAIL PROTECTED] wrote:
> > Using a 5.2.pre2- win32 binary..
> > 1. Un-install does not remove all of the files.
> >     These files remain:

> > 
> > 2. Un-install does not remove service information from registry
> > 
> >    CHECK = Invoke REGEDIT and search from the top for snmpd.log
> > 
> >    Install then CHECK . should not see snmpd.log
> > 
> >    Register agent service then CHECK.  should see snmpd.log
> > 
> >    Un-install then CHECK. should not see snmpd.log
> > 
> > These statements I believe should hold true
> >  When user invokes Register service, that action should always succeed
> >  When user invokes Unregister service, that action should always succeed
> 
> This is where I start to question. IMO it should succeed unless it fails 
> :-) Please see below.
> 
> > 
> > 3. If I install, register service, un-install,
> >    then install, attempt to register service will fail,
> >    with indication that the service is already registered
> >       "Can't create service Net-SNMP Agent.
> >        The specified service already exists.
> >       "
> >    I must manually unregister the service, in this case.
> 
> Yes, as it stands today. This will almost certainly be fixed for 5.2. It 
> is a problem with the installer, not the service code. The service 
> should be unregistered on uninstall.
>

The most recent test binary unregisters at uninstall..

 
> >     I believe that the correct fix is to
> >     invoke the unregister service function when this occurs,
> >     and then retry the register service function one more time.
> >     I think something like the change I've described
> >        should be made in winservice.c.
> >     I don't trust return codes in .BAT files.
> >      They have been proven unreliable.
> > 
> >      What do you think of this ?
> > 
> > 
> The same functionality could probably be had in the register batch 
> files. The reason I don't think that it belongs in the service code is 
> that, just as you mentioned, register would always succeed. A well 
> behaved service will fail to register if there is already a service with 
> the same name registered. Unregistering the service should be done 
> manually or through uninstalling the application. I am working on fixing 
> that as we speak. I would like to know what other Windows users think of 
>   this. Anyone else also, please feel free to chime in!
> 
> Andy
> 
> 
> 
> -- 
> --------------------------
> Andy Smith, MCP
> [EMAIL PROTECTED]
> --------------------------
> 


Andy, I agree with you that the uninstall script, not
the "register service" function, is the correct place
to unregister.

I hope other users will comment, too.
-Mike Slifcak




-------------------------------------------------------
This SF.net email is sponsored by: IT Product Guide on ITManagersJournal
Use IT products in your business? Tell us what you think of them. Give us
Your Opinions, Get Free ThinkGeek Gift Certificates! Click to find out more
http://productguide.itmanagersjournal.com/guidepromo.tmpl
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to