VBScript, 1 to apply registry changes, another to change admin pass

Punkrulz

Somewhat eXPerienced
Joined
24 Dec 2001
Messages
790
Hey guys,

I believe I just need 2 more scripts and I think I am going to be golden. Can someone either point me into the right direction, or post me sample scripts that I can use to apply to my situation???

Script 1:
I need a script that will do the following;
1) Apply registry settings specified in a file that I select to the computers the script runs on.
2) After applying those registry settings, I need the script to move the computers from their existing user group, to another of my choice. This ensures that the script only runs once on the computers, as well as tells me what computers have had the registry settings applied to it.

Script 2:
I need a logon script that will change the Local Administrator password to that of my liking. Most of the computers are already set to the password that I want, however there are some out there that have an administrator password neither myself nor my co-worker know of what it is.
 
Hey guys,

I believe I just need 2 more scripts and I think I am going to be golden. Can someone either point me into the right direction, or post me sample scripts that I can use to apply to my situation???

Script 1:
I need a script that will do the following;
1) Apply registry settings specified in a file that I select to the computers the script runs on.
2) After applying those registry settings, I need the script to move the computers from their existing user group, to another of my choice. This ensures that the script only runs once on the computers, as well as tells me what computers have had the registry settings applied to it.
Why is it such a big deal if it runs only once? What happens when after you move the computer, the user goes back in and changes the registry to something else?

In any case, this link should point you in the right direction for reading/writing registry keys. I'm not feeling very motivated to write one myself

Checking computer group memberships is a matter of binding to AD and pulling the group info. and running your if/then matches on the collection that is returned. Examples here or here


Script 2:
I need a logon script that will change the Local Administrator password to that of my liking. Most of the computers are already set to the password that I want, however there are some out there that have an administrator password neither myself nor my co-worker know of what it is.

I would recommend against setting the local admin password via a login script. Login scripts in a domain environment sit on the netlogon share which is world readable.. which means your plain-text vbs/bat/cmd file is readable as well.

Better to write a standard batch file and use a utility like PsPassword and feed a for loop a list of computer names to get it done remotely

or create a batch file using the net user command:
Code:
net user Administrator <passwordhere>
and use it in combination with something like psexec and again run it through a for loop to remotely change all the Administrator passwords.
 
Last edited:
Why is it such a big deal if it runs only once? What happens when after you move the computer, the user goes back in and changes the registry to something else?

Well, I don't necessarily think it is a problem if it runs more than once, however I just want to kind of cancel all unnecessary script runs and if the script ran everytime the computer was restarted, that would be kind of pointless.

Also, users are in a limited environment, and don't have the ability to go into the registry and change things at will... and also user experience, there is only a small handful of "computer people" that may even know what the registry is. Fortunately however as I previously stated, they're in a limited environment.[/quote]

fitz said:
I would recommend against setting the local admin password via a login script. Login scripts in a domain environment sit on the netlogon share which is world readable.. which means your plain-text vbs/bat/cmd file is readable as well.

Better to write a standard batch file and use a utility like PsPassword and feed a for loop a list of computer names to get it done remotely

or create a batch file using the net user command:
Code:
net user Administrator <passwordhere>
and use it in combination with something like psexec and again run it through a for loop to remotely change all the Administrator passwords.

I shall take a look at this, and see if it is a feasible option. Thank you!
 

Members online

No members online now.

Latest profile posts

Also Hi EP and people. I found this place again while looking through a oooollllllldddd backup. I have filled over 10TB and was looking at my collection of antiques. Any bids on the 500Mhz Win 95 fix?
Any of the SP crew still out there?
Xie wrote on Electronic Punk's profile.
Impressed you have kept this alive this long EP! So many sites have come and gone. :(

Just did some crude math and I apparently joined almost 18yrs ago, how is that possible???
hello peeps... is been some time since i last came here.
Electronic Punk wrote on Sazar's profile.
Rest in peace my friend, been trying to find you and finally did in the worst way imaginable.

Forum statistics

Threads
62,015
Messages
673,494
Members
5,621
Latest member
naeemsafi
Back