Policies\System路径下,用何命令来判断NoDispCPL这一子项是否存在。急
2 个解决方案
#1
Reg:=TRegistry.Create;
try
Reg.RootKey:=HKEY_LOCAL_MACHINE;
Reg.OpenKey(Software\Microsoft\Windows\CurrentVersion\
Policies\System',True);
if Reg.ValueExists('NoDispCPL') = True then
............................
finally
Reg.CloseKey;
end;
try
Reg.RootKey:=HKEY_LOCAL_MACHINE;
Reg.OpenKey(Software\Microsoft\Windows\CurrentVersion\
Policies\System',True);
if Reg.ValueExists('NoDispCPL') = True then
............................
finally
Reg.CloseKey;
end;
#2
少个引号呢.先定位到要的根键.再打开要找的子键.如果返回值是真就有了啊..
#1
Reg:=TRegistry.Create;
try
Reg.RootKey:=HKEY_LOCAL_MACHINE;
Reg.OpenKey(Software\Microsoft\Windows\CurrentVersion\
Policies\System',True);
if Reg.ValueExists('NoDispCPL') = True then
............................
finally
Reg.CloseKey;
end;
try
Reg.RootKey:=HKEY_LOCAL_MACHINE;
Reg.OpenKey(Software\Microsoft\Windows\CurrentVersion\
Policies\System',True);
if Reg.ValueExists('NoDispCPL') = True then
............................
finally
Reg.CloseKey;
end;
#2
少个引号呢.先定位到要的根键.再打开要找的子键.如果返回值是真就有了啊..