Chris Rasmussen · Photographer · Infrastructure Guy · Code Dabbler · Traveller

How to perform an unattended installation of SNMP on Windows Server 2003

Continuing with the recent history of unattended installation articles, this post contains instructions on how to install SNMP quickly and quietly from the command line. SNMP is useful, for example, when you need to tap into the server with monitoring tools like MRTG, Op Manager, IP Sentry etc.

To perform an unattended installation of SNMP you need 2 things. First you need to create an answer file for the installation program (Sysocmgr.exe) to get the configuration from. Here’s my sample file.

[NetOptionalComponents]
SNMP=1
[SNMP]
Contact_Name=John Doe
Location=Brisbane, Australia
Service = Physical, Applications, End-to-End
Community_Name=Public
Send_Authentication=Yes
Accept_CommunityName=Public:Read_Only
Any_Host=Yes

Once you’ve got the answer file sorted, how do you use it? Easy. If you save your answer file as C:\Scripts\snmp.inf you run a command like this one (obviously you’ll need to change the path and file names if you name and save it somewhere/something else).

C:\Windows\System32\Sysocmgr.exe /i:%windir%\inf\sysoc.inf /u:C:\Scripts\snmp.inf

The above command will run a completely unattended (but not silent!) installation of the SNMP component of Windows.

Please note that unless you’ve got the Windows installation files as well as the installation files for any service packs available for Sysocmgr.exe to find you may be prompted for their location during the installation. There are ways around this but I’ll get to those in another post.

And here is a sample script to do the whole lot with one click.

@echo off
:: Perform an unattended install of SNMP
::
:: Chris Rasmussen
:: June 2008
::
:: Changes:
::
:: June 19 2008 - Created script
 
:: Install SNMP
cls
echo Installing SNMP ...
echo.
C:\Windows\System32\Sysocmgr.exe /i:%windir%\inf\sysoc.inf /u:C:\Scripts\snmp.inf

4 Responses to “How to perform an unattended installation of SNMP on Windows Server 2003”

  1. Charlie says:

    Thank you for this.

    Saved me a ton of work! ! !

    Cheers

  2. Mike J says:

    Does this work on Windows 2008? If so, how do you set Accept SNMP packets from these hosts: xxx.xxx.xxx.xxx and yyy.yyy.yyy.yyy

  3. Mike J says:

    And set traps to community name and trap desitinations?

  4. [...] have to sit through the installation process if you are upgrading from another operating system.How to perform an unattended installation of SNMP on Windows …Continuing with the recent history of unattended installation articles, this post contains [...]

Leave a Reply

Powered by Wordpress | Designed by Elegant Themes