Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Edit Registry Names

Status
Not open for further replies.

greg0303

Technical User
May 5, 2006
94
CA
Is there any way to use VBScript to edit a Registry Key name? For example in HKLM\System\MountedDevices if there is a Key named '\DosDevices\E:' I want to change it to '\DosDevices\X:'. How can this be done? I want to leave the key value, just need to change the name.
 
I am not aware of a way to do it with vbscript but you can do it with PowerShell

Code:
Rename-Item -Path HKCU:\Sandpit\KeyToRename -NewName KeyRenamed | Out-Null

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
Work SMARTER not HARDER. The Spider's Parlor's Admin Script Pack is a collection of Administrative scripts designed to make IT Administration easier! Save time, get more work done, get the Admin Script Pack.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top