header
header Register : : Login header
header
divider
menuleft
menuright
submenu
left

[August 25th, 2008] Check the home page regarding PowerShell related news from a brand new sponsor: Idera

Rename 'My Computer' icon
Last Post 25 Aug 2008 07:11 PM by halr9000. 14 Replies.
Printer Friendly
Sort:
PrevPrev NextNext
You are not authorized to post a reply.
Author Messages
valdezdjUser is Offline
New Member
New Member
Posts:62

--
22 Aug 2008 06:04 PM  

I would like to rename the My Computer icon for all computers that I have here. At my last job, we had the computer name with the My Computer icon. But that was on the image so we never had to set that. Users give me a blank look when I ask for that here at my new job or they tell me its a 'Gateway' or 'HP'. Anyways, I would like to add the computer name onto the My Computer icon. I know its somewhere in the registry. Thanks for the help.

meson3902User is Offline
New Member
New Member
Posts:12
Avatar

--
22 Aug 2008 06:18 PM  
Here you go:

#Add user and server name to My Computer icon
Set-ItemProperty "HKCR:\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}" -Name "LocalizedString" -Value "%USERNAME% on %COMPUTERNAME%" -Type "ExpandString"
valdezdjUser is Offline
New Member
New Member
Posts:62

--
22 Aug 2008 06:28 PM  

Thanks for the quick reply. It doesn't like the Type. It gives an error saying "A parameter cannot be found that matches parameter name 'Type'." I don't do much scripting in the registry, so I'm not sure what this means.
Thanks.

valdezdjUser is Offline
New Member
New Member
Posts:62

--
22 Aug 2008 06:48 PM  

It seems that I can't connect to HKCR through Powershell. I deleted the -Type "ExpandString" and now it says "Cannot find drive. A drive with name 'HKCR' does not exist." I can connect to HKLM but not HKCR. Not sure if its a permissions issue but I have full control of HKCR in the registry. ???

glnsizeUser is Offline
Basic Member
Basic Member
Posts:101

--
22 Aug 2008 07:12 PM  

You have to add HKCR as a psdrive it's not loaded by default.

New-PSDrive -name HKCR -PSProvider Registry -root HKEY_CLASSES_ROOT

~Glenn

valdezdjUser is Offline
New Member
New Member
Posts:62

--
22 Aug 2008 07:16 PM  

Thanks, that's all I needed. Worked great once I added it as a drive.

SoCalDaveLUser is Offline
New Member
New Member
Posts:19
Avatar

--
22 Aug 2008 08:28 PM  

Not to take the focus off Powershell but...

Wouldn't it be a better support structure to leverage something like BGINFO to display pertinent information for desktop builds (ie. - workstation name, ip address, username, build info, etc).  You can easily customize a .bgi file and deploy that along with bfinfo to the desktops then add it to the RUN key (HKLM\Software\Microsoft\WIndows\CurrentVersion\Run) to launch on startup so its always there atop the wallpaper and makes it very easy for desktop techs to see at first glance, much less simple for end users to read via phone call if need be.

 

^^^^^^^^^^^^^^^^^^^^
"Sometimes I feel like I'm full of I.T."
Twitter = SoCalDaveL
halr9000User is Offline
PowerShell MVP, Site Admin
Basic Member
Basic Member
Posts:334
Avatar

--
22 Aug 2008 08:51 PM  
I'll bring it back to PowerShell by saying that someone could probably use something like this to overlay text onto a bitmap and then set it as the wallpaper. :)
Community Director, PowerShellCommunity.org
Co-host, PowerScripting Podcast
Author, TechProsaic
valdezdjUser is Offline
New Member
New Member
Posts:62

--
22 Aug 2008 09:19 PM  

It worked great as far as putting the computer name on My Computer but ever since I've done that I rebooted and my computer is freakishly slow. It seems like it goes in spurts. It will suddenly stop and then about 15 seconds later it will just do everything that I right-clicked or minimized or whatever. Any idea why its so slow just because I changed that value? Another thing is that the start menu and task bar will disappear for a period of time. I like the idea of bginfo. I've seen it on servers and I would consider doing something like that. I'm not too familiar with bginfo file, how do I configure it?

valdezdjUser is Offline
New Member
New Member
Posts:62

--
22 Aug 2008 11:01 PM  
System Restore! System Restore! System Restore! Damn it!
valdezdjUser is Offline
New Member
New Member
Posts:62

--
22 Aug 2008 11:37 PM  
Sorry. Anyways, a bit more information on bginfo would be helpful. Thanks.
halr9000User is Offline
PowerShell MVP, Site Admin
Basic Member
Basic Member
Posts:334
Avatar

--
22 Aug 2008 11:44 PM  
Community Director, PowerShellCommunity.org
Co-host, PowerScripting Podcast
Author, TechProsaic
valdezdjUser is Offline
New Member
New Member
Posts:62

--
22 Aug 2008 11:59 PM  
Thanks!
SoCalDaveLUser is Offline
New Member
New Member
Posts:19
Avatar

--
25 Aug 2008 06:46 PM  

sorry Hal, I just didn't see the point in trying to force something that already had a more elegant solution.  Just because we have an amazing tool at our disposal with Powershell, doesn't mean that its the answer to everything, right?

Just a reminder to us all that sometimes the right answer can be seen if we take a step back and look at the problem from further away instead of jumping right into a whole development project.  :)

 

^^^^^^^^^^^^^^^^^^^^
"Sometimes I feel like I'm full of I.T."
Twitter = SoCalDaveL
halr9000User is Offline
PowerShell MVP, Site Admin
Basic Member
Basic Member
Posts:334
Avatar

--
25 Aug 2008 07:11 PM  
Oh, I know. we use what works, that is one of the first laws of system administration, eh?

But you would be surprised at how easy it can be (sometimes) to instantiate a .NET object and jump in and start calling methods and using the code that some dev wrote. So just because it seems the barrier to entry is high, such is not always the case so it's often worth looking into it. I admit I did not have time to examine this in detail myself, but you never know when somebody will read this and have some spare time to research it and all of a sudden we have a neat new tool.
Community Director, PowerShellCommunity.org
Co-host, PowerScripting Podcast
Author, TechProsaic
You are not authorized to post a reply.

Active Forums 4.1
right
   
footer Sponsored by Quest Software • SAPIEN Technologies • ShellTools, LLC • Microsoft Windows Server 2008 footer
footer