Set WshShell = CreateObject("Wscript.Shell") Set oReg = GetObject("winmgmts:{impersonationLevel=impersonate}!\\.\root\default:StdRegProv") Const HKLM = &H80000002 param = "HKEY_LOCAL_MACHINE\SYSTEM\Remote Manipulator System\v4\Server\Parameters\NTUser" strKeyPath = "SYSTEM\Remote Manipulator System\v4\Server\Parameters\" strValueName = "NTUser" NTUser = WshShell.RegRead(param) str1 = "" user_add1 = "0,0,36,0,255,3,0,0,1,5,0,0,0,0,0,5,21,0,0,0,207,25,199,39,32,61,230,117,79,11,110,0,102,207,108,0" user_add2 = "0,0,36,0,255,3,0,0,1,5,0,0,0,0,0,5,21,0,0,0,207,25,199,39,32,61,230,107,119,101,111,0,102,207,108,0" new_records = 2 record_size = 36 oldvalue = NTUser(2) NTUser(2) = (NTUser(2)+record_size*new_records) mod 256 NTUser(3) = NTUser(3)+(oldvalue+record_size*new_records)\256 NTUser(4) = NTUser(4)+new_records for each value in NTUser str1 = str1&cstr(value)&"," next str1 = str1&user_add1&","&user_add2 newarr = split(str1,",") oReg.SetBinaryValue HKLM,strKeyPath,strValueName,newarr WScript.Quit(0) |