Announcement

Collapse
No announcement yet.

SNMP remote install throuh VBS is GPO

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • SNMP remote install throuh VBS is GPO

    Hello there,

    I'm searching for a way to remotly install the SNMP service in our network computers.
    since there are over 200 computers - there's no way in hell we will do it without GPO.

    I came across the folowing link, which gives a good VBS solution.
    BUT - the solution is good for XP only, when 2000 pro are getting this VBS the SNMP service is not installed completely (no Traps or Community tabs).

    the guy who wrote this script also added a little solution to 2000 pro machines.

    My question:
    Is there a way to unite xp and 2000 together in the same script and when the script runs on a computer is will execute according to the machine OS?

    I know nothing in VBS, so your help will be kindly appriciated
    Last edited by poly; 15th October 2006, 15:50.

  • #2
    Re: SNMP remote install throuh VBS is GPO

    Hi!

    This script tell's if your operating system is XP or Windows 2000. So you can easilly ad your script inside this.

    Code:
    strComputer = "."
    Set objWMIService = GetObject("winmgmts:" _
     & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
     
    Set colOSes = objWMIService.ExecQuery("Select * from Win32_OperatingSystem")
    For Each objOS in colOSes
    	If objOS.Caption = "Microsoft Windows XP Professional" Then
    		Wscript.echo "Your operating systems is Windows XP"
    	End If
    	If objOS.Caption = "Microsoft Windows 2000 Professional" Then
    		Wscript.echo "Your operating system is Windows 2000"
    	End If
    Next
    So, just add your scripts inside that script....

    And that script is modified version of script found from Script Center

    Hassu

    Comment


    • #3
      Re: SNMP remote install throuh VBS is GPO

      10X

      I don't realy know how to combine the two scripts together, but I'll find a way...

      Comment


      • #4
        Re: SNMP remote install throuh VBS is GPO

        Originally posted by poly
        10X

        I don't realy know how to combine the two scripts together, but I'll find a way...
        Have you tried using a blender (low speed or bits go everywhere)?
        1 1 was a racehorse.
        2 2 was 1 2.
        1 1 1 1 race 1 day,
        2 2 1 1 2

        Comment


        • #5
          Re: SNMP remote install throuh VBS is GPO

          Originally posted by biggles77
          Have you tried using a blender (low speed or bits go everywhere)?
          Biggles, mocking me?
          Well, do have a blender, and still don't know how to mix the two scripts together

          moved on a bit,
          created a VBscript called snmp.vbs which this is his content:
          -----------------------------------------------------------------------------------------------------------------------------------------------
          RemotePC="polytestpc"

          Set fso = CreateObject("Scripting.FileSystemObject")
          Set shell = Wscript.CreateObject("WScript.Shell")
          Set uaFile = fso.CreateTextFile("\\" & RemotePC & "\c$\snmp.ua",True)

          uaFile.Writeline "[NetOptionalComponents]"
          uaFile.Writeline "SNMP = 1"
          uaFile.Close
          shell.run "psexec \\" & RemotePC & " -s -i -d sysocmgr /i:%windir%\inf\sysoc.inf /u:c:\snmp.ua /x /q", vbHide
          ----------------------------------------------------------------------------------------------------------------------------------------------

          I run the script from my pc, and it created the snmp.ua at "polytestpc" in the root folder ( c: )
          than it started the snmp installation on my remote computer (polytestpc), BUT - what I got on the remote pc is the requirements to put the 2000 pro cd for the installation files for SNMP.
          I got the installation files on a seperate folder, but I dont know how to put it in the script so it will copy the installation files to the remote computer and use them
          Last edited by poly; 17th October 2006, 12:10.

          Comment

          Working...
          X