Trying to add a new snmp trap destination to the registry and it keep

(imported topic written by chrism91)

Here is my action but i can’t seem to figure out why it is failing.

Action1 (default)

Script Type BigFix Action Script

action uses wow64 redirection true

download http://MYSERVER.MYDOMAIN:52311/Uploads/f4f847b82437d9e88d0e0c8a61bb840d37141880/SNMP%20TRAP%20Changereg.tmp

continue if {(size of it = 299 AND sha1 of it = “f4f847b82437d9e88d0e0c8a61bb840d37141880”) of file “SNMP TRAP Changereg.tmp” of folder “__Download”}

extract SNMP TRAP Changereg.tmp

waithidden regedit /s “{pathname of client folder of current site & “__Download\SNMP TRAP Change.reg”}”

Bassically i used the Registry Wizard to pull the .reg file in. I can run it by douple clicking the file and it works great. Should i use the software destruption wizard instead.

Thanks for the help.

(imported comment written by chrism91)

Don’t know if it makes a difference but it seems to work now that i changed SNMP TRAP Change.reg to SNMPTRAPChange.reg with no spaces.

(imported comment written by BenKus)

If you have spaces, you want to use:

extract “SNMP Trap Changereg.tmp”

(with quotes)

Ben

(imported comment written by chrism91)

DUH makes since…I should have seen that. Thats why renaming it worked. Thanks Ben for the reply.

(imported comment written by SystemAdmin)

FWIW - we did SNMP settings this way:

Fixlet (Task):

Microsoft Windows - SNMP Configuration

waithidden net stop snmp

delete __appendfile

delete regdel.reg

appendfile REGEDIT4

appendfile

-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers

appendfile

-HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities

move __appendfile regdel.reg

wait regedit /s regdel.reg

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\RFC1156Agent

" “sysContact”=“Contact”

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\RFC1156Agent

" “sysLocation”=“Anywhere, USA”

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\RFC1156Agent

" “sysServices”=dword:0000004f

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers

" “1”=“localhost”

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers

" “2”=“networktrapdestination1”

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers

" “3”=“networktrapdestination2”

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities

" “ReadString”=dword:00000004

regset "

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities

" “WriteString”=dword:00000008

waithidden net start snmp

Analysis:

SNMP Information (Windows)

Relevance 1

(version of client >= “6.0.0.0”) AND (exists true whose (if true then (member of group 161 of site “actionsite”) else false))

SNMP Status - Period 1 hour

if exists service “SNMP” then state of service “SNMP” else “Not Installed”

SNMP Agent Settings - Period 1 day

if exists service “SNMP” then concatenation “,” of (name of it & “=” & it as string) of values of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\RFC1156Agent” of registry else “N/A”

SNMP Security Community Names - Period 1 day

if exists service “SNMP” then concatenation “,” of (name of it & “=” & it as string) of values of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\ValidCommunities” of registry else “N/A”

SNMP Security Permitted Hosts - Period 1 day

if exists service “SNMP” then concatenation “,” of (name of it & “=” & it as string) of values of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\SNMP\Parameters\PermittedManagers” of registry else "N/A"Relevance

John