C# and the registery

  • Thread starter Thread starter Jason
  • Start date Start date
J

Jason

I've got 20 PC's that I need to change the Description/name field for each
NIC, and each PC has three NIC adapters (all PC's are the same Hardware). I
know how to change it maunaully in the registery, but I need to do this in
C#.

I know the path
HKLM\System\Controlset001\Control\Network\{4D36E972-........} is the same on
all my PC's but the folders beneth that path are all different from PC to
PC, and I want to go into each one and change the name key within the
connection folder.

Since I can use a static path name to change, how would I loop through them
to change that string?

Any ideas?
 
Jason,

Doing it this way is the last way I would recommend performing this
task.

Rather, use the classes in the System.Management namespace to set the
properties on the WMI classes for each of the NIC cards in each of the
machines.
 
Yeah, I found out you have to go through the registery. That property is a
read only one.


Nicholas Paldino said:
Jason,

Doing it this way is the last way I would recommend performing this
task.

Rather, use the classes in the System.Management namespace to set the
properties on the WMI classes for each of the NIC cards in each of the
machines.


--
- Nicholas Paldino [.NET/C# MVP]
- (e-mail address removed)

Jason said:
I've got 20 PC's that I need to change the Description/name field for
each NIC, and each PC has three NIC adapters (all PC's are the same
Hardware). I know how to change it maunaully in the registery, but I need
to do this in C#.

I know the path
HKLM\System\Controlset001\Control\Network\{4D36E972-........} is the same
on all my PC's but the folders beneth that path are all different from PC
to PC, and I want to go into each one and change the name key within the
connection folder.

Since I can use a static path name to change, how would I loop through
them to change that string?

Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top