Another way to automatically change the My Computer caption without editing the registry.

Jerold Schulman

August 15, 2006

1 Min Read
ITPro Today logo in a gray background | ITPro Today

In tip 2001 and tip 2760, we used the registry modification to alter the caption of the My Computer icon  and/or Start menu item.

I have scripted MyComputer.bat to alter the My Computer icon caption and/or Start menu item caption.

To use My Computer, place a minimized shortcut to My Computer in the All Users Startup folder, or include it in a logon script.

MyComputer.bat currently changes the caption to:

User %UserName%on %ComputerName%via %LOGONSERVER%on %USERDOMAIN%
Like
User Jerryon JSI009via \JSI001on JSIINC

My Computer contains:

@echo off@echo Set oShell = CreateObject( "WScript.Shell" )>"%TEMP%MyComputer.vbs"@echo user=oShell.ExpandEnvironmentStrings("%%UserName%%")>>"%TEMP%MyComputer.vbs"@echo comp=oShell.ExpandEnvironmentStrings("%%ComputerName%%")>>"%TEMP%MyComputer.vbs"@echo logs=oShell.ExpandEnvironmentStrings("%%LOGONSERVER%%")>>"%TEMP%MyComputer.vbs"@echo domw=oShell.ExpandEnvironmentStrings("%%USERDOMAIN%%")>>"%TEMP%MyComputer.vbs"@echo IconName=user ^& vbcrlf _ >>"%TEMP%MyComputer.vbs"@echo. ^& " on " ^& comp ^& vbcrlf _>>"%TEMP%MyComputer.vbs"@echo. ^& " via " ^& logs ^& vbcrlf _>>"%TEMP%MyComputer.vbs"@echo. ^& " on " ^& domw >>"%TEMP%MyComputer.vbs"@echo Const MY_COMPUTER = ^&H11^&>>"%TEMP%MyComputer.vbs"@echo Set oShell = CreateObject("Shell.Application")>>"%TEMP%MyComputer.vbs"@echo Set oFolder = oShell.Namespace(MY_COMPUTER)>>"%TEMP%MyComputer.vbs"@echo Set oSelf = oFolder.Self>>"%TEMP%MyComputer.vbs"@echo oSelf.Name = IconName>>"%TEMP%MyComputer.vbs"cscript //nologo "%TEMP%MyComputer.vbs"


Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like