Läuft echt super
Hab jetzt folgende function geschrieben:
Delphi-Quellcode:
function RegLoginAndConnectRegistry(lpMachineName:
string; hKey: HKEY;
var phkResult: HKEY; User, Password:
string): Longint;
var
lpNetResource: TNetResource;
begin
with lpNetResource
do
begin
dwType := RESOURCETYPE_ANY;
lpLocalName :=
nil;
lpProvider :=
nil;
lpRemoteName:= pchar(lpMachineName+'
\IPC$');
end;
result := WNetAddConnection2(lpNetResource, pchar(Password), pchar(User), 0);
if result = NO_ERROR
then
result := RegConnectRegistry(pchar(lpMachineName), hKey, phkResult);
end;
Vielen Danke Christian!