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″
RELATED POSTS
- Reset the Registry and the File Permissions in Windows XP
- Fix Search association settings in Vista
- Reset the Always ask before opening this type of file setting
- Prevent Internet Explorer Toolbar Layout from being Reset
- PreviewConfig tool registers file types for the Preview Pane in Windows Vista
- Register DLLs (elevated) using the context menu
- Error “Windows cannot open the User Accounts control panel” when opening User Accounts
- Restore missing “Mozilla Firefox” entry to Set Program Access and Defaults in Windows XP
- Underline keyboard shortcuts and access keys in Windows Vista
- Fix for Application not found error when opening an URL
BOOKMARK THIS PAGE
BlinkList | del.icio.us | Digg it | Furl | ma.gnolia | Newsvine | reddit | Spurl | Wink |


If you enjoyed this post, make sure you
Prefer an E-mail subscription?