本帖最后由 woeiwoei 于 2010-4-5 21:35 编辑
看看 P大虾的··LocalSecurityAuthority.au3。。
举例:#include <LocalSecurityAuthority.au3>
If Not IsDeclared("KEY_READ") Then $KEY_READ = 0x20019
If Not IsDeclared("KEY_ALL_ACCESS") Then $KEY_ALL_ACCESS = 0xF003F
If Not IsDeclared("HKEY_CLASSES_ROOT") Then $HKEY_CLASSES_ROOT= 0x80000000
Dim $aAceList[2][4] = [["Users", $KEY_READ, $GRANT_ACCESS, $SUB_CONTAINERS_AND_OBJECTS_INHERIT],["Everyone", $KEY_READ, $GRANT_ACCESS, $SUB_CONTAINERS_AND_OBJECTS_INHERIT]]
$sSubKey = "CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\command"
$iResult = _RegSetKeySecurityDacl($HKEY_CLASSES_ROOT, $sSubKey, $aAceList)
|