Einzelnen Beitrag anzeigen

Christian Seehase
(Co-Admin)

Registriert seit: 29. Mai 2002
Ort: Hamburg
11.105 Beiträge
 
Delphi 11 Alexandria
 
#18

Re: [Zugriff verweigert] Problem mit Remote Registry

  Alt 11. Dez 2006, 22:20
Moin Zusammen,

also mir sind noch folgende Dinge in der Dokumentation zu RegConnectRegistry aufgefallen:

Zitat von PSDK - RegConnectRegistry - Remarks:
If the computer is joined to a workgroup and the "Force network logons using local accounts to authenticate as Guest" policy is enabled, the function fails. Note that this policy is enabled by default if the computer is joined to a workgroup.
Leider weiss ich im Moment nicht, wo man diese Policy finden kann.

Zitat von PSDK - RegConnectRegistry - Remarks:
If the current user does not have proper access to the remote computer, the call to RegConnectRegistry fails. To connect to a remote registry, call LogonUser with LOGON32_LOGON_NEW_CREDENTIALS and ImpersonateLoggedOnUser before calling RegConnectRegistry.
Dafür gibt es hier Beispiele (bzw. mindestens eines )

Zitat von PSDK - RegConnectRegistry - Remarks:
Windows 2000: One possible workaround is to establish a session to an administrative share such as IPC$ using a different set of credentials. To specify credentials other than those of the current user, use the WNetAddConnection2 function to connect to the share. When you have finished accessing the registry, cancel the connection.
Auch wenn es sich auf 2000 bezieht:
IMHO müsste das auch unter XP-Pro funktionieren.
Die Fehlermeldung, die ihr da bekommt deutet ja schon darauf hin, dass schon eine Verbindung besteht.
Probiert es doch auch noch einmal mit der IP-Adresse des Rechners.
Tschüss Chris
Die drei Feinde des Programmierers: Sonne, Frischluft und dieses unerträgliche Gebrüll der Vögel.
Der Klügere gibt solange nach bis er der Dumme ist
  Mit Zitat antworten Zitat