Brian Chivers
(Fresh Scripter)
2002-08-15 03:57 PM
Renaming "My Computer"

Does anyone know how to rename "My Computer" ?

What I'd like to do is rename it to the computer name as show by @WKSTA and possible even the IP address (e/g PC75000 192.168.0.1)as the user logins in.

I've managed so far to alter "My Documents" to point to the users `Homedrive` and alter IE to point to our intranet but this bit I just can't seem to get my mind round [Confused]

Any idea will be gratefully received.

Thanks
Brian


Radimus
(KiX Supporter)
2002-08-15 05:41 PM
Re: Renaming "My Computer"

Show User and Computer Name on Desktop (Windows NT/2000/XP) Popular
Category: Home > Windows > Desktop
This tweak will rename "My Computer" to "Username on Computername" making it simple to determine which computer you are logged on to and which username you are logged on as.

Using REGEDT32.EXE (this is necessary for REG_EXPAND_SZ) open your registry and find the key in the settings section below. Then continue following the steps for your Windows version.

For Windows NT
Delete the existing value called "No Name" and add a new REG_EXPAND_SZ value with an empty value name and set the value to "%USERNAME% on %COMPUTERNAME%".

For Windows 2000
Rename the value named "LocalizedString" to "LocalizedString.old". Create a new REG_EXPAND_SZ value named "LocalizedString", and copy the contents of the original value to the new value except change the words "My Computer" to equal "%USERNAME% on %COMPUTERNAME%". For example, the new "LocalizedString" value may equal "@C:\WINNT\system32\shell32.dll,-9216@1033,%USERNAME% on %COMPUTERNAME%".

For Windows XP or Internet Explorer 6.0+
Rename the value named "LocalizedString" to "LocalizedString.old". Create a new REG_EXPAND_SZ value named "LocalizedString", and set the value to "%USERNAME% on %COMPUTERNAME%".

Exit the registry editor, click on your desktop and press F5 (for refresh). The "My Computer" icon should now be rename to "Username on Computername".

Note: Users of Internet Explorer 6.0 or greater should use the method for Windows XP.

Registry Settings
System Key: [HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}]
Data Type: REG_EXPAND_SZ (Expanded String Value)


Beelzel
(Fresh Scripter)
2002-08-15 07:24 PM
Re: Renaming "My Computer"

a good site for really getting into trouble with the REG is REGEdit it has helped me blowup a few boxes in my day ... oops, I mean make changes.

badboii
(Fresh Scripter)
2002-08-15 07:55 PM
Re: Renaming "My Computer"

Just a quick question...can you access REGEDT32 from Kix - wondering if this can be done within the login script so all computers in a domain are changed.

Thanks for any help!


LonkeroAdministrator
(KiX Master Guru)
2002-08-15 08:01 PM
Re: Renaming "My Computer"

yes you can...
and regedit too.
just with shell or run command.

anyway, writing just reg info and with no such create amount of stuff...
you might want to look at kix's:
writevalue()
addkey()

functions...


Radimus
(KiX Supporter)
2002-08-15 08:11 PM
Re: Renaming "My Computer"

here is a basic script for it... but I'm not certain how useful it would be. In this case to grab and post the IP would probably require Admin Privs to write to the reg key.

code:
	if (left($ie,1)="6" and $os="Win2k") or $os="WinXP"
$myIP=enumipinfo($nic,0)
$=writevalue("HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}","LocalizedString","%%USERNAME%% on %%COMPUTERNAME%% @@ $MyIP",REG_EXPAND_SZ)
endif