[Lazarus] Remote Registry...

Sven Barth pascaldragon at googlemail.com
Fri Aug 23 10:54:38 CEST 2013


Am 23.08.2013 10:37, schrieb Michael Van Canneyt:
>
>>> Not entirely. According to the Delphi documentation RootKey needs to 
>>> be set instead of CurrentKey and also the key must be closed in the 
>>> end. I've already done the implementation and I'm currently testing it.
>>> As a workaround for older FPC versions simply set RootKey to the 
>>> value returned by RegConnectRegistry.
>>> Note: The login stuff mentioned on the MSDN page needs to be done 
>>> nevertheless.
>> Implemented in FPC revision 25332.
>>
>> Attached is an example program that shows how to remotely connect to 
>> another machine (this can also be used for using RegConnectRegistry 
>> directly in case of FPC 2.6.2 and older). The machine name is given 
>> as UNC name as first argument (e.g. "\\SomeComputer") and the 
>> username as second argument. The password will be queried on the 
>> command line by Windows. If the connection is successful the keys of 
>> HKEY_USERS of the remote machine will be enumerated. Tested on a 
>> Windows 7 machine connecting to another Windows 7 machine.
>>
>> Note: The remote registry service must run on the destination machine.
>
> Maybe commit the example in fcl-registry/examples ?
Done in 25334. Including a few comments on what's happening.

Regards,
Sven






More information about the Lazarus mailing list