Board index » delphi » RegistryConnect Problem With NT --> 95/98 Connection

RegistryConnect Problem With NT --> 95/98 Connection

As A test I ran the following program (Code at bottom) from an NT 4.0
Server logged in as Administrator. I am able to connect to any other
NT server/workstation on our network and read the registry. However,
when I attempt to read the registry of any 95/98 I get a "Unable To
Connect To Remote Machine" message and thus no read of the registry.

If I understand correctly I should be able to connect to any machine
on the network (NT/95/98) and read the registry of the remote machine
provided I am logged in as ADMINISTRATOR and I am reading from an NT
machine.

Am I correct or do I have to install the addon to each of the 95/98
machines to enable me to read the registry of each of the remote
machines.

This program will always run on an NT 4.0 server logged in as
administrator.

Any help is much appreciated

Iain

----------------------------------------------------------------------------

  Listbox1.items.clear;

  R         := TRegistry.Create;
  R.RootKey := HKEY_LOCAL_MACHINE;

  if not R.RegistryConnect('\\'+ Edit1.text)
  then
    begin
    PnlStatus.Caption := 'Unable To Connect To Remote Machine \\' +
Edit1.Text;
    End
  Else
    Begin
    PnlStatus.Caption := 'Connected To Remote Machine \\' +
Edit1.Text;

    R.OpenKey('\Software\Microsoft\Windows
NT\CurrentVersion\WinLogon\', FALSE);
    ListBox1.Items.Add('User Name = ' +
R.ReadString('DefaultUserName'));

    R.OpenKey('\System\CurrentControlSet\Control\ComputerName\ComputerName\',
FALSE);
    ListBox1.Items.Add('Computer Name = ' +
R.ReadString('ComputerName'));

  R.Free;

 

Re:RegistryConnect Problem With NT --> 95/98 Connection


If I remember correctly, you do have to set up each 9x machine to allow
remote administration.  Can't remember how to do it though.

--

Colin Dawson
Analyst Programmer
colin.daw...@e-mis.co.uk
Telephone: 0113 3919 254

Privileged and/or Confidential information may be contained in this message.
If you are not the original addressee indicated in this message (or
responsible for delivery of the message to such person), you may not copy or
deliver this message to anyone. In such case, please delete this message,
and notify us immediately.
Opinions, conclusions and other information expressed in this message are
not given or endorsed by my firm or employer unless otherwise indicated by
an authorised representative independently of this message.
Egton Medical Information Systems Limited. Registered in England. No
2117205.
Registered Office: Park House Mews, 77 Back Lane, Off Broadway, Horsforth,
Leeds, LS18 4RF

Quote
"Iain Wilson" <iwil...@dundee.tokheim.com> wrote in message

news:2174c13c.0110190227.641ce011@posting.google.com...
Quote
> As A test I ran the following program (Code at bottom) from an NT 4.0
> Server logged in as Administrator. I am able to connect to any other
> NT server/workstation on our network and read the registry. However,
> when I attempt to read the registry of any 95/98 I get a "Unable To
> Connect To Remote Machine" message and thus no read of the registry.

> If I understand correctly I should be able to connect to any machine
> on the network (NT/95/98) and read the registry of the remote machine
> provided I am logged in as ADMINISTRATOR and I am reading from an NT
> machine.

> Am I correct or do I have to install the addon to each of the 95/98
> machines to enable me to read the registry of each of the remote
> machines.

> This program will always run on an NT 4.0 server logged in as
> administrator.

> Any help is much appreciated

> Iain

> --------------------------------------------------------------------------
--

>   Listbox1.items.clear;

>   R         := TRegistry.Create;
>   R.RootKey := HKEY_LOCAL_MACHINE;

>   if not R.RegistryConnect('\\'+ Edit1.text)
>   then
>     begin
>     PnlStatus.Caption := 'Unable To Connect To Remote Machine \\' +
> Edit1.Text;
>     End
>   Else
>     Begin
>     PnlStatus.Caption := 'Connected To Remote Machine \\' +
> Edit1.Text;

>     R.OpenKey('\Software\Microsoft\Windows
> NT\CurrentVersion\WinLogon\', FALSE);
>     ListBox1.Items.Add('User Name = ' +
> R.ReadString('DefaultUserName'));

R.OpenKey('\System\CurrentControlSet\Control\ComputerName\ComputerName\',

- Show quoted text -

Quote
> FALSE);
>     ListBox1.Items.Add('Computer Name = ' +
> R.ReadString('ComputerName'));

>   R.Free;

Re:RegistryConnect Problem With NT --> 95/98 Connection


Iain Wilson <iwil...@dundee.tokheim.com> schreef in berichtnieuws
2174c13c.0110190227.641ce...@posting.google.com...

Quote
> As A test I ran the following program (Code at bottom) from an NT 4.0
> Server logged in as Administrator. I am able to connect to any other
> NT server/workstation on our network and read the registry. However,
> when I attempt to read the registry of any 95/98 I get a "Unable To
> Connect To Remote Machine" message and thus no read of the registry.

> If I understand correctly I should be able to connect to any machine
> on the network (NT/95/98) and read the registry of the remote machine
> provided I am logged in as ADMINISTRATOR and I am reading from an NT
> machine.

> Am I correct or do I have to install the addon to each of the 95/98
> machines to enable me to read the registry of each of the remote
> machines.

> This program will always run on an NT 4.0 server logged in as
> administrator.

> Any help is much appreciated

> Iain

> --------------------------------------------------------------------------
--

>   Listbox1.items.clear;

>   R         := TRegistry.Create;
>   R.RootKey := HKEY_LOCAL_MACHINE;

>   if not R.RegistryConnect('\\'+ Edit1.text)
>   then
>     begin
>     PnlStatus.Caption := 'Unable To Connect To Remote Machine \\' +
> Edit1.Text;
>     End
>   Else
>     Begin
>     PnlStatus.Caption := 'Connected To Remote Machine \\' +
> Edit1.Text;

>     R.OpenKey('\Software\Microsoft\Windows
> NT\CurrentVersion\WinLogon\', FALSE);
>     ListBox1.Items.Add('User Name = ' +
> R.ReadString('DefaultUserName'));

R.OpenKey('\System\CurrentControlSet\Control\ComputerName\ComputerName\',

Quote
> FALSE);
>     ListBox1.Items.Add('Computer Name = ' +
> R.ReadString('ComputerName'));

>   R.Free;

In het kort.....gebruik HKEY_CURRENT_USER.....dan zit je op elk platform
goed!

Re:RegistryConnect Problem With NT --> 95/98 Connection


Quote
On Fri, 19 Oct 2001 14:50:56 +0200, "G.C." <G...@hotmail.nl> wrote:

>> If I understand correctly I should be able to connect to any machine
>> on the network (NT/95/98) and read the registry of the remote machine
>> provided I am logged in as ADMINISTRATOR and I am reading from an NT
>> machine.

I guess that the point here is: Are the W98 boxes part of the domain
or not? If they are not then your being an admin on the NT4 server
will probably not help. I think this must be fulfilled:
1) W95/98 boxes are part of the domain
2) The NT4 server is also part of the same domain
3) You are logged on as a domain user with domainadmin rights

I may be wrong, cause I am not using W95/98 only NT class machines...

Bo Berglund
bo.bergl...@telia.com

Re:RegistryConnect Problem With NT --> 95/98 Connection


All the 95/98/NT machines are part of the samne domain.
I am logged on as Administrator

Other Threads