Hi!

Michael J. Slifcak wrote:
Alex Burger wrote:
Doesn't the agent and trapd apps find the config files based on the environment variables set by the installer? I'm sure I have used the agent in the past without having to include the paths when registering.

Have you installed net-snmp from .EXE to e.g. D:\USR, open a command prompt window, registered the agent using "snmpd -register", not modified the Registry parameters directly, installed D:\USR\ETC\SNMP\snmpd.conf, and had that working for you ?

In my experience, the environment *for a service* is not the same as
the environment that the command prompt window receives.

I just found a tech note that explains that services do read the system environment variables, but the system will need a reboot if the env variables have been changed since boot-up. This is because services.exe only reads the system env when it starts and services.exe only starts when the system boots up. Please read this tech note:


http://support.microsoft.com/default.aspx?scid=kb;en-us;821761

This may also be of interest:

http://support.microsoft.com/default.aspx?scid=kb;en-us;104011

The tech note does not mention Windows XP or 2003, but I assume it would be the same.

We can either expect the user to reboot their machine to make the environment variables visible (NOT good!), or add the config files to the service command line when registering. I would rather add the config files to the register command than force a reboot.

It looks like these changes have already been done by Andy, but I thought a good explanation of why would be good.

Alex



-------------------------------------------------------
This SF.Net email is sponsored by: YOU BE THE JUDGE. Be one of 170
Project Admins to receive an Apple iPod Mini FREE for your judgement on
who ports your project to Linux PPC the best. Sponsored by IBM.
Deadline: Sept. 24. Go here: http://sf.net/ppc_contest.php
_______________________________________________
Net-snmp-coders mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/net-snmp-coders

Reply via email to