Add Key To HKLM Registry - Action Script

(imported topic written by RobertDiRosato)

I am having trouble adding a key to HKLM.

I tried a bat / reg combo with no luck.

How can I add the below value to the registry using the action script…

Please Help

Windows Registry Editor Version 5.00

HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VSCore\Script Scanner

“ExcludedURLs”=hex(7):68,00,74,00,74,00,70,00,73,00,3a,00,2f,00,2f,00,61,00,70,\

00,70,00,73,00,2e,00,63,00,68,00,69,00,6c,00,64,00,72,00,65,00,6e,00,73,00,\

70,00,6c,00,61,00,63,00,65,00,2e,00,63,00,6f,00,6d,00,00,00,68,00,74,00,74,\

00,70,00,3a,00,2f,00,2f,00,61,00,70,00,70,00,73,00,2e,00,63,00,68,00,69,00,\

6c,00,64,00,72,00,65,00,6e,00,73,00,70,00,6c,00,61,00,63,00,65,00,2e,00,63,\

00,6f,00,6d,00,00,00,68,00,74,00,74,00,70,00,3a,00,2f,00,2f,00,69,00,6e,00,\

74,00,72,00,61,00,74,00,63,00,70,00,00,00,68,00,74,00,74,00,70,00,73,00,3a,\

00,2f,00,2f,00,69,00,6e,00,74,00,72,00,61,00,74,00,63,00,70,00,00,00,68,00,\

74,00,74,00,70,00,73,00,3a,00,2f,00,2f,00,61,00,73,00,70,00,65,00,6e,00,70,\

00,61,00,2e,00,61,00,72,00,63,00,68,00,69,00,76,00,65,00,73,00,79,00,73,00,\

74,00,65,00,6d,00,73,00,2e,00,63,00,6f,00,6d,00,00,00,68,00,74,00,74,00,70,\

00,3a,00,2f,00,2f,00,61,00,73,00,70,00,65,00,6e,00,70,00,61,00,2e,00,61,00,\

72,00,63,00,68,00,69,00,76,00,65,00,73,00,79,00,73,00,74,00,65,00,6d,00,73,\

00,2e,00,63,00,6f,00,6d,00,00,00,68,00,74,00,74,00,70,00,3a,00,2f,00,2f,00,\

63,00,68,00,69,00,6c,00,64,00,72,00,65,00,6e,00,73,00,70,00,6c,00,61,00,63,\

00,65,00,2e,00,63,00,6f,00,6d,00,00,00,68,00,74,00,74,00,70,00,73,00,3a,00,\

2f,00,2f,00,63,00,68,00,69,00,6c,00,64,00,72,00,65,00,6e,00,73,00,70,00,6c,\

00,61,00,63,00,65,00,2e,00,63,00,6f,00,6d,00,00,00,68,00,74,00,74,00,70,00,\

3a,00,2f,00,2f,00,61,00,72,00,63,00,68,00,69,00,76,00,65,00,73,00,79,00,73,\

00,74,00,65,00,6d,00,73,00,2e,00,63,00,6f,00,6d,00,00,00,68,00,74,00,74,00,\

70,00,73,00,3a,00,2f,00,2f,00,61,00,72,00,63,00,68,00,69,00,76,00,65,00,73,\

00,79,00,73,00,74,00,65,00,6d,00,73,00,2e,00,63,00,6f,00,6d,00,00,00,68,00,\

74,00,74,00,70,00,3a,00,2f,00,2f,00,31,00,30,00,2e,00,00,00,68,00,74,00,74,\

00,70,00,73,00,3a,00,2f,00,2f,00,31,00,30,00,2e,00,00,00,00,00

(imported comment written by RobertDiRosato)

I tried this as a test but it does not seem to add the key or value.

Please help

delete __appendfile

delete temp.reg

appendfile REGEDIT4

appendfile HKEY_LOCAL_MACHINE\SOFTWARE\McAfee\VSCore\Script_Scanner

appendfile “Rob”=dword:00000000

copy __appendfile temp.reg

wait regedit /s temp.reg

  • Create New Custom Action
  • Select Endpoints
  • Click Action Script
  • Enter the above

But it don’t work… I got this from the BigFix Wesite…

I’m on the latest version of BigFix…

(imported comment written by RobertDiRosato)

Also tried this with no luck

regset "

HKEY_LOCAL_MACHINE\Software\ROB

" “Rob”=“Robs Value”

I wish IBM had people monitor this forum and answer questions

(imported comment written by SystemAdmin)

Is McAfee configured to protect it’s registry keys?

(imported comment written by RobertDiRosato)

I uninstalled McAfee on those machines to make sure it wasn’t blocking.

I found that it works on XP but not Windows 7… I am going to start another thread…

How to make a registry change for Windows XP

(In my environment this will not work for Windows 7)

= Log into the BigFix Console

= From the Tools pull down menu select Createe New Custom Action

= Select Endpoints to deploy this actions to

= Click the Action Script TAB

= Enter one or all of the below. (Tweak to desired output)

RegSet "

HKEY_LOCAL_MACHINE\Software\ROB

" “ROB-STRING”=“String”

RegSet "

HKEY_LOCAL_MACHINE\Software\ROB

" “ROB-BINARY”=hex:10,00,10,10,11,10,00,01,00,00,00,11,10,10

RegSet "

HKEY_LOCAL_MACHINE\Software\ROB

" “ROB-DWORD”=dword:00001234

RegSet "

HKEY_LOCAL_MACHINE\Software\ROB

" “ROB-MULTI-STRING”=hex(7):73,00,74,00,72,00,69,00,6e,00

Option 1 will add a DWORD value

Option 2 a Binary value

If the key or value already exists the above will overwrite it.

(imported comment written by jeremylam)

Are the Win7 systems also 64-bit? If so, regset will change the 32-bit keys (unhelpfully under the wow6432node in HKLM/software). However, inspecting these keys using the registry inspector (not x64 inspector) works identically on 64 and 32 bit systems.

To change registry keys in the “normal” HKLM/Software node on a 64-bit system, you’ll need to use regset64.

(imported comment written by SystemAdmin)

don’t forget to add the [ ] to your regset command… i allways for get this part!

RegSet "

HKEY_LOCAL_MACHINE\Software\ROB

" “ROB-STRING”=“String”

RegSet "

HKEY_LOCAL_MACHINE\Software\ROB

" “ROB-BINARY”=hex:10,00,10,10,11,10,00,01,00,00,00,11,10,10

RegSet "

HKEY_LOCAL_MACHINE\Software\ROB

" “ROB-DWORD”=dword:00001234

RegSet "

HKEY_LOCAL_MACHINE\Software\ROB

" “ROB-MULTI-STRING”=hex(7):73,00,74,00,72,00,69,00,6e,00

(imported comment written by SystemAdmin)

Well, looks like the forum removes the brackets from this command…

and doesn’t let me edit one of my own posts…