Windows: Internet Explorer set open as default action for a file extension

Hi,

the following steps describe how to  open a file with a specific file extension in Internet Explorer without showing the open/save dialog. In this example a the URL http://myintranethost.local/data/doc.pptm should open the PowerPoint Viewer without any interaction.

If not exists create the registry key

HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\ {0002DF01-0000-0000-C000-000000000046}

c:\> reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}"

To determine the applications, in this case the PowerPoint Viewer, subvalue
Download sysinternals ProcessMonitor, start it, set the filter

Path -> contains -> AttachmentExecute

Procmon Filter - AttachmentExecute
Procmon Filter – AttachmentExecute

and start the event capturing.

Open the URL to your document, for me http://myintranethost.local/data/doc.pptm. Take a look in the Process Monitor Window. There should be an RegQueryValue event to the Registry which is appropriate to open a file without showing the save dialog.

Procmon RegQueryValue event

Add these value to the Registry

c:\> reg add "HKCU\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}" /f /v PowerPointViewer.ShowMacroEnabled.12 /t REG_NONE

and Internet Explorer should open the PowerPoint Viewer immediately.

To make this setting also available to all new users, write it to the Default Profile.
Load the Default User registry hive

c:\>reg LOAD HKLM\_LOAD_DEFAULT C:\Users\Default\ntuser.dat

Set the value

c:\> reg add "HKLM\_LOAD_DEFAULT\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}"
c:\> reg add "HKLM\_LOAD_DEFAULT\Software\Microsoft\Windows\Shell\AttachmentExecute\{0002DF01-0000-0000-C000-000000000046}" /f /v PowerPointViewer.ShowMacroEnabled.12 /t REG_NONE

Unload the hive

c:\> reg unload HKLM\_LOAD_DEFAULT


 

Michael

Leave a Reply Cancel reply