Link to home
Start Free TrialLog in
Avatar of kgbsd
kgbsd

asked on

Need a script to make this happen!

How can I script this so all users will have this regedit?

Change My Computer to the actual computer name and username. Open regedt32 and go to the HKEY_CLASSES_ROOT \CLSID{20D04FE0-3AEA-1069-A2D8-08002B30309D}
subkey. Copy the contents of the key's LocalizedString subkey (e.g., @C:\WINNT\system32\shell32.dll,-9216@1033,My Computer) to Notepad. Delete the LocalizedString subkey, then recreate it using the data type REG_EXPAND_SZ. Copy Notepad's contents into the new subkey, and change My Computer to %username% on %computername%.
ASKER CERTIFIED SOLUTION
Avatar of Panadmin
Panadmin

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of kgbsd
kgbsd

ASKER

We are almost all on IE 6.  For that I have found I need to do this:

If you are using Windows XP, or if Internet Explorer 6.0 is installed, the data value of the LocalizedString Value Name should only include the variables and text that you want. DO NOT include @%SystemRoot%\system32\shell32.dll,-9216@1033, in the string.

Would I just run this script in a .bat file?
Thanks.
Good. The script above will handle that procedure.

Save the script as RenameMyComputer.vbs (or a name of your choice ending in .vbs) and then call it from a batch file using

cscript.exe RenameMyComputer.vbs

Include the path to the VBS file if it isn't in the same folder as the batch file.