本帖最后由 tjlzh 于 2010-11-28 16:55 编辑
已解决,正确代码见2楼afan超版的回帖
"HKEY_USERS\S-1-5-21-1606980848-2139871995-682003330-500"
S-1-5-21-1606980848-2139871995-682003330-500这段键值,而是根据用户不同,每个系统这个键值就不一样。
afan超版的代码可以读取出来$i = 1
While 1
$var = RegEnumKey('HKEY_USERS', $i)
If @error <> 0 Then ExitLoop
If StringRegExp($var, 'S-(?:\d+-){6}\d+') Then ExitLoop MsgBox(0, 0, $var)
$i += 1
WEnd
可是我需要取到这个值把相应的键值写注册表,如何写代码呢?
我想写入的注册表是RegWrite('HKEY_USERS\S-1-5-21-xxxx-xxxx-xxxx-500\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100')
RegWrite('HKEY_USERS\S-1-5-21-xxxx-xxxx-xxxx-500\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100', 'http', 'REG_DWORD', '0x00000002')
RegWrite('HKEY_USERS\S-1-5-21-xxxx-xxxx-xxxx-500\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Ranges\Range100', ':Range', 'REG_SZ', '133.96.100.*')
如何把取到的值加到上面的代码中呢 |