/bundles/itninjaweb/img/Breadcrumb_cap_w.png
Hi,

Any body has VB script to modify the binary value in registry.

I have the below key:

[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections]
"SavedLegacySettings"=hex:3c,00,00,00,1d,00,00,00,07,00,00,00,00,00,00,00,00,\
00,00,00,25,00,00,00,68,74,74,70,3a,2f,2f,61,75,74,6f,70,72,6f,78,79,2e,65,\
75,2e,63,73,63,2e,63,6f,6d,2f,70,72,6f,78,79,2e,70,61,63,00,00,00,00,00,00,\
00,00,b0,98,1a,ad,08,75,ca,01,01,00,00,00,ac,10,64,46,00,00,00,00,00,00,00,\
00

I need to modify the 9th value in the first line that is from 07 to 03.

Now the new value looks should be:
"SavedLegacySettings"=hex:3c,00,00,00,1d,00,00,00,09,00,00,00,00,00,00,00,00,\
00,00,00,25,00,00,00,68,74,74,70,3a,2f,2f,61,75,74,6f,70,72,6f,78,79,2e,65,\
75,2e,63,73,63,2e,63,6f,6d,2f,70,72,6f,78,79,2e,70,61,63,00,00,00,00,00,00,\
00,00,b0,98,1a,ad,08,75,ca,01,01,00,00,00,ac,10,64,46,00,00,00,00,00,00,00,\


Thanks
Sanhivi
0 Comments   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

0
Hi

Check this out ;)


const HKEY_CURRENT_USER = &H80000001
strComputer = "."

Set objReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" &_
strComputer & "\root\default:StdRegProv")

'Define byte's array
Dim bArray

strKeyPath = "Software\Microsoft\Windows\CurrentVersion\Internet Settings\Connections"

'Fill array with values of the key;
'array elemnts starts from 0 an up,
'so I need to change bArray(2) element's value

objReg.GetBinaryValue HKEY_CURRENT_USER, strKeyPath, "DefaultConnectionSettings", bArray

'Changing value
bArray(8) = 3

'Write infromation back
objReg.SetBinaryValue HKEY_CURRENT_USER, strKeyPath, "DefaultConnectionSettings", bArray

Set objReg = Nothing
Answered 01/12/2012 by: He M u
Senior Yellow Belt

Please log in to comment