script modify registry entry on many PCs

May 20, 2011 at 05:04:36
Specs: Windows XP
Hi;

I'm looking to create a script that enumerates through a text file of hostnames and then changes a value called "Userinit" in the registry at HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon on all those machines.
Is this possible?


See More: script modify registry entry on many PCs

Report •

#1
May 22, 2011 at 09:20:18
You could, but if something goes wrong, you effectively brick the box, so why would you want to?

How To Ask Questions The Smart Way


Report •

#2
May 23, 2011 at 02:02:26
Its just an entry that inits a drive mapping script exe.
If this disappears, it doesn't matter too much as i can start this manually - I just want to automate this as i don't want to connect to the remote registry on over 2000 machines and update this manually.

Report •

#3
May 23, 2011 at 05:41:48
Userinit is the wrong place to put it. If something goes wrong with the executable, your user is denied the ability to log on. Even administrators, attempting to work during a network outage, might not be able to log in.

The correct way would be to use AD as intended and have a logon script that runs whenever anyone logs in.

The, "I must add this functionality programmatically!" method would involve creating a service, and have that service subscribe to Service Control Manager notifications.

How To Ask Questions The Smart Way


Report •

Related Solutions

#4
May 24, 2011 at 23:04:46
I see what you are getting at now.
the structure above is within the current AD structure at my workplace (I don't want to touch anything that may end up turning the box into scrap metal). I will have a look at the existing logon script. Thanks

Report •

Ask Question