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

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 Jerry
on JSI009
via \\JSI001
on 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"


Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish