Archive for July, 2006

Access Is Denied When Opening a Particular File Type?

Q: Any file on my computer that ends in .gif gives the message “Access is denied.” when I try to open it. If I rename the file to .jpg or something else, it opens fine (though that’s not a good thing to do, obviously). Any other image file opens fine, and if I rename one of them to .gif and try to open it, I get “Access is denied.” And it’s not just image files. Any file that opens with no problem, when renamed to .gif and opened, results in “Access is denied.”

The file association information for .GIF file type is given below by the asker.

[HKEY_CLASSES_ROOT\.gif]
“PerceivedType”=”image”
@=”giffile”
“Content Type”=”image/gif”

[HKEY_CLASSES_ROOT\.gif\OpenWithProgids]
“giffile”=hex(0):

[HKEY_CLASSES_ROOT\.gif\PersistentHandler]
@=”{098f2470-bae0-11cd-b579-08002b30bfeb}”

[HKEY_CLASSES_ROOT\giffile]
@=”GIF Image”
“BrowserFlags”=dword:00000008
“EditFlags”=dword:00010000
“FriendlyTypeName”=hex(2):40,00,25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,\
00,6f,00,6f,00,74,00,25,00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,\
32,00,5c,00,73,00,68,00,69,00,6d,00,67,00,76,00,77,00,2e,00,64,00,6c,00,6c,\
00,2c,00,2d,00,33,00,30,00,32,00,00,00
“ImageOptionFlags”=dword:00000003

[HKEY_CLASSES_ROOT\giffile\CLSID]
@=”{25336920-03F9-11cf-8FD0-00AA00686F13}”

[HKEY_CLASSES_ROOT\giffile\DefaultIcon]
@=”shimgvw.dll,2″

[HKEY_CLASSES_ROOT\giffile\shell\open]
@=”Animate”

[HKEY_CLASSES_ROOT\giffile\shell\open\command]
@=”\”D:\\Program Files\\msgif\\GIFAnimator.exe\” \”%1\”"

[HKEY_CLASSES_ROOT\giffile\shell\open\ddeexec]

[HKEY_CLASSES_ROOT\giffile\shell\open\ddeexec\Application]
@=”shimgvw”

[HKEY_CLASSES_ROOT\giffile\shell\open\ddeexec\Topic]
@=”System”

[HKEY_CLASSES_ROOT\giffile\shell\Paint]

[HKEY_CLASSES_ROOT\giffile\shell\Paint\command]
@=”\”%SystemRoot%\\System32\\mspaint.exe\” \”%1\”"

After examining the settings carefully, I spotted atleast one error in the GIF file association setting.

[HKEY_CLASSES_ROOT\giffile\shell\Paint\command]
@=”\”%SystemRoot%\\System32\\mspaint.exe\” \”%1\”"

In the above key, the (default) value type is REG_SZ, but the existing data contains expandable values / environment strings. If you need to use expandable values such as %Windir%, %Systemroot% etc, you should use the REG_EXPAND_SZ value type.

The “Access is denied” error was then resolved by changing the above entry (into already expanded format) directly in the registry.

“%SystemRoot%\System32\mspaint.exe” “%1″

becomes

“C:\Windows\System32\mspaint.exe” “%1″

Customize the Icons in the Start Menu

Q:    Is it is possible to change the icons for the right-panel of the Start Menu in Windows XP Pro. (the icons for My Documents, My Computer, Network Places, Printers & Faxes and others) ?

I know that certain visual styles software like Windows Blinds can do this too. I was wondering if one could do this without the use of such programs. A way to do this through the registry would be welcome. Thanks..

A:    You can set the icons for special folders in the following key (per-user override)

HKEY_CURRENT_USER \ Software \ Microsoft \ Windows \ CurrentVersion \ Explorer \ CLSID \ {GUID} \ DefaultIcon

Where {GUID} is the Globally Unique Identifier pertaining to a special folder. The {GUID} for various special folders are given below. Note that you need to create the registry keys up to that level above, for each special folder for which you want to customize the icon.

My Computer {20D04FE0-3AEA-1069-A2D8-08002B30309D}
My Documents {450D8FBA-AD25-11D0-98A8-0800361B1103}
Network Connections {7007ACC7-3202-11D1-AAD2-00805FC1270E}
Printers & Faxes {2227A280-3AEA-1069-A2DE-08002B30309D}
My Network Places {208D2C60-3AEA-1069-A2D7-08002B30309D}
Set Program access and Defaults {2559A1F7-21D7-11D4-BDAF-00C04F60B9F0}
Control Panel {21EC2020-3AEA-1069-A2DD-08002B30309D}
Recycle Bin {645FF040-5081-101B-9F08-00AA002F954E}
Internet Explorer {871C5380-42A0-1069-A2EA-08002B30309D}

FYI, the icon for the My Pictures folder comes from the Desktop.ini file present in that folder. So you need to alter the Desktop.ini file to change My Pictures folder icon.