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: W14731Filename: Make a Shortcut to MyComputer Icon.txt