dougstech
asked on
VBS file to modify registry
I am looking to create a simple .vbs file that will modify a registry key. I need it to have a prompt to change one key, and automatically change the other key.
The keys are
hkey_local_machine>softwar e>microsof t>windows nt>winlogon>defaultusernam e
hkey_local_machine>softwar e>microsof t>windows nt>winlogon>defaultdomainn ame
I need a simple prompt that will ask me for the defaultusername, and when I enter it, it will change the key with my value. And, I need it to always change the defaultdomainname to "MCPS".
I have never programmed, and I am not even sure if this is the correct way to do this. Thanks for your help!
The keys are
hkey_local_machine>softwar
hkey_local_machine>softwar
I need a simple prompt that will ask me for the defaultusername, and when I enter it, it will change the key with my value. And, I need it to always change the defaultdomainname to "MCPS".
I have never programmed, and I am not even sure if this is the correct way to do this. Thanks for your help!
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
BrandonGalderisi
the script does NOT have a password to be stored in the registry. the user will still have to enter their password, but the username and domain would be filled in for them.
the script does NOT have a password to be stored in the registry. the user will still have to enter their password, but the username and domain would be filled in for them.
I BELIEVE... the defaultusername and defaultdomainname are only used for auto login when the autologin flag is set. I believe that the defaultusername and defaultdomainname will still always display the last logged in user.
But I could be wrong.
But I could be wrong.
ASKER
Thank you so much! It worked perfectly! This saves me a TON of time in the registry! thanks again
you are welcome :-)
I realize that you can't do this with vbs, but it's a better setup to use xp power toys to do your auto login as it won't store the PW in cleartext.
http://www.windowsreference.com/windows-xp/enable-autologon-in-windows-2000xp2003/