JSI Tip 9650. When you clear the 'Always ask before opening this type of file' setting in Internet Explorer on Windows XP SP2, and Windows Server 2003 SP1, it is not retained?

When you download a file using Internet Explorer 6, and clear the Always ask before opening this type of file box, and then save the file to your disk, subsequent downloads of this file type should not present the File Download dialog. In your environment, the dialog may begin to appear.

When a user clears the Always ask before opening this type of file and saves a file to disk, Internet Explorer writes a <FType> Value Name to the HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\\{0002DF01-0000-0000-C000-000000000046\} key, with a REG_NONE data type and zero-length binary value.

NOTE: If Office XP is installed and you clear the Always ask before opening this type of file box when download a .DOC file, the <FType> Value Name is Word.Document.8.

This behavior will occur if an Administrator or Power User opens the Edit File Type dialog at My Computer / Tools / Folder Options / File Types / <The File Tpe> / Advanced,  as this action deletes the <FType> Value Name.

To resolve this issue, you can use any of the following techinques:

• Manually set the option the next time you download. - This option can be accidentantly unset an Administrator or Power User.

• Create a shortcut to a batch file that runs the following command:

REG ADD "HKCU\Software\Microsoft\Windows\Shell\AttachmentExecute\\{0002DF01-0000-0000-C000-000000000046\}" /V <FType> /T REG_NONE /F /D ""
where <FType> might be Word.Document.8.

• An Administrator can clear the Confirm open after download check box at My Computer / Tools / Folder Options / File Types / <The File Type> / Advanced and then press OK.

• An Administrator can run:

ClearCOD .ext

Where .ext is the file type, like .DOC.

ClearCOD.bat contains:

@echo off
if \{%1\}==\{\} @echo Syntax: ClearCOD .ext&goto :EOF
setlocal
set ext=%1
if "%ext:~0,1%" NEQ "." goto err1
set key="NONE"
call :getext>nul 2>&1
if %key% EQU "NONE" goto err
set OK=N
call :get>nul 2>&1
if "%OK%" EQU "N" set /a EditFlags=0
set /a EditFlags=%EditFlags% ^& 4294901759
call :upd>nul 2>&1
endlocal
goto :EOF
:getext
for /f "Tokens=3*" %%a in ('REG QUERY "HKCR\%ext%" /VE^|find "REG_SZ"') do (
 set key="HKCR\%%b"
)
goto :EOF
:get
for /f "Tokens=1,3" %%a in ('REG QUERY %key% /V EditFlags^|FIND /I "EditFlags"') do (
 set OK=Y
 set /a EditFlags=%%b
)
goto :EOF
:upd
REG ADD %key% /V EditFlags /T REG_DWORD /F /D %EditFlags%
goto :EOF
:err
@echo ClearCOD cannot find the HKCR\%ext% key.
endlocal
goto :EOF
:err1
@echo ClearCOD .ext - %ext% has no leading period.
endlocal



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish