WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Shortcut Information

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

How to Make a Shortcut to the MyComputer Icon

Keywords: 	  shortcut mycomputer

This is in the interest of sharing some info. I don't know if anyone is interested, but I had to add a test for a null string returned from the RegQueryValue. I tested this on a machine that has Norton Utilities installed and the registry for the 'My Computer' icon has been severely altered. So this piece of code installs the shortcut with the default 'My Computer' in such cases where nothing is returned.

Long road to a small house huh!?!

handle=RegOpenkey(@REGMACHINE,"SOFTWARE\Classes\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}")
mycomputer=RegQueryValue(handle,"[]")
if mycomputer=="" then mycomputer="My Computer"
RegCloseKey(handle)
if FileExist("C:\SumDir\SumSubDir\%mycomputer%.lnk")==@false then
   ShortCutMake("C:\SumDir\SumSubDir\%mycomputer%","Explorer.exe","::{20D04FE0-3AEA-1069-A2D8-08002B30309D}","", @NORMAL)
endif

Article ID:   W14731
Filename:   Make a Shortcut to MyComputer Icon.txt
File Created: 2000:11:14:13:13:06
Last Updated: 2000:11:14:13:13:06