Board index » Visual Studio » Change the "My Computer" Text

Change the "My Computer" Text

Visual Studio315
I need to change the "My Computer" Text on the desktop to read the computer

name instead. Anyone one know how this can be done with VBS.



Thanks

Gavin...


-
 

Re:Change the "My Computer" Text

The value of LocalizedString at

HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} is the computername. You

~may~ be able to enter %COMPUTERNAME% in place of the current value. (Back

it up first.) Try that, and then kill your explorer.exe process and restart

it to see the change.



Ray at work



"Gavin" <grossnospam@stewart.com>wrote in message

Quote
I need to change the "My Computer" Text on the desktop to read the

computer

name instead. Anyone one know how this can be done with VBS.



Thanks

Gavin...









-

Re:Change the "My Computer" Text

www.theeldergeek.com/rename_my_computer_on_desktop.htm">www.theeldergeek.com/rename_my_computer_on_desktop.htm

try this

"Gavin" <grossnospam@stewart.com>wrote in message

Quote
I need to change the "My Computer" Text on the desktop to read the

computer

name instead. Anyone one know how this can be done with VBS.



Thanks

Gavin...









-

Re:Change the "My Computer" Text

The data type needs to change to type Reg_Expand_Sz in order to return the

variable value.



--

Regards,



Dave Patrick ....Please no email replies - reply in newsgroup.

Microsoft MVP [Windows NT/2000 Operating Systems]



"Ray at <%=sLocation%>" <myfirstname at lane34 dot com>wrote:

Quote
The value of LocalizedString at

HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} is the computername.

You

~may~ be able to enter %COMPUTERNAME% in place of the current value.

(Back

it up first.) Try that, and then kill your explorer.exe process and

restart

it to see the change.



Ray at work



"Gavin" <grossnospam@stewart.com>wrote in message

news:u8u2VrTgDHA.3128@tk2msftngp13.phx.gbl...

>I need to change the "My Computer" Text on the desktop to read the

computer

>name instead. Anyone one know how this can be done with VBS.

>

>Thanks

>Gavin...

>

>









-

Re:Change the "My Computer" Text

Ah, it is not a multi_sz in OSes older than XP. Thank you Dave.



Ray at work



"Dave Patrick" <mail@Nospam.DSPatrick.com>wrote in message

Quote
The data type needs to change to type Reg_Expand_Sz in order to return the

variable value.



--

Regards,



Dave Patrick ....Please no email replies - reply in newsgroup.

Microsoft MVP [Windows NT/2000 Operating Systems]



"Ray at <%=sLocation%>" <myfirstname at lane34 dot com>wrote:

>The value of LocalizedString at

>HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D} is the computername.

You

>~may~ be able to enter %COMPUTERNAME% in place of the current value.

(Back

>it up first.) Try that, and then kill your explorer.exe process and

restart

>it to see the change.

>

>Ray at work

>

>"Gavin" <grossnospam@stewart.com>wrote in message

>news:u8u2VrTgDHA.3128@tk2msftngp13.phx.gbl...

>>I need to change the "My Computer" Text on the desktop to read the

>computer

>>name instead. Anyone one know how this can be done with VBS.

>>

>>Thanks

>>Gavin...

>>

>>

>

>









-

Re:Change the "My Computer" Text

"Ray at <%=sLocation%>" wrote:



Quote
Ah, it is not a multi_sz in OSes older than XP. Thank you Dave.



Hi



Actually, it has nothing to do with OS versions. If you want to show the data in

a environment value (represented with %<env-name>%) in this registry value, it

must be of type Reg_Expand_Sz, regardless of OS version.





--

torgeir

Microsoft MVP Scripting and WMI, Porsgrunn Norway

Administration scripting examples and an ONLINE version of the 1328 page

Scripting Guide: www.microsoft.com/technet/scriptcenter">www.microsoft.com/technet/scriptcenter





-

Re:Change the "My Computer" Text

Gavin wrote:



Quote
I need to change the "My Computer" Text on the desktop to read the computer

name instead. Anyone one know how this can be done with VBS.



Hi



In Win2k/WinXP, change the default value under

HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}



to REG_EXPAND_SZ and put in the environment variable %computername%. Click on

the desktop and press F5 or log off/on to see the change on the icon.





Here is a vbscript that makes the changes in registry for you:



Set oShell = CreateObject("WScript.Shell")



sRegPath = "HKCU\Software\Microsoft\Windows\CurrentVersion\" _

& "Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\"



oShell.RegWrite sRegPath, "%computername%", "REG_EXPAND_SZ"





--

torgeir

Microsoft MVP Scripting and WMI, Porsgrunn Norway

Administration scripting examples and an ONLINE version of the 1328 page

Scripting Guide: www.microsoft.com/technet/scriptcenter">www.microsoft.com/technet/scriptcenter





-

Re:Change the "My Computer" Text

Thanks you all for the help.



Gavin...



"Torgeir Bakken (MVP)" <Torgeir.Bakken-spam@hydro.com>wrote in message

Quote
Gavin wrote:



>I need to change the "My Computer" Text on the desktop to read the

computer

>name instead. Anyone one know how this can be done with VBS.



Hi



In Win2k/WinXP, change the default value under



HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\CLSID\{

20D04FE0-3AEA-1069-A2D8-08002B30309D}

Quote


to REG_EXPAND_SZ and put in the environment variable %computername%. Click

on

the desktop and press F5 or log off/on to see the change on the icon.





Here is a vbscript that makes the changes in registry for you:



Set oShell = CreateObject("WScript.Shell")



sRegPath = "HKCU\Software\Microsoft\Windows\CurrentVersion\" _

& "Explorer\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\"



oShell.RegWrite sRegPath, "%computername%", "REG_EXPAND_SZ"





--

torgeir

Microsoft MVP Scripting and WMI, Porsgrunn Norway

Administration scripting examples and an ONLINE version of the 1328 page

Scripting Guide: www.microsoft.com/technet/scriptcenter">www.microsoft.com/technet/scriptcenter









-