9

Windows Explorer Shell Command Files are a feature added to Windows with Internet Explorer 4 (95 / NT 4). They were used in the now-defunct Quick Launch bar to show the desktop, open IE4's Channels feature and open Windows Explorer(?). These files have not been created by Windows since XP. For some reason, they behave like shortcuts in the shell; they can't be opened in programs using the built-in Windows open dialog's GUI - only by typing in the full file path.

I have been puzzled by .scf files for some time. Despite being built in to every version of Windows since Windows 95 (although heavily nerfed in later versions) there is no documentation of it on the Microsoft website, except that you can get your "Show Desktop" button back by copying and pasting if you accidentally delete it. They appear to be based on the .ini configuration file format, but that's not very useful.

Does any documentation on Windows Explorer Shell Command Files exist?

  • Two things, first of all, the ini format has been around since win3.x. it is fairly extensible depending on the method you are parsing the file with. The Show Desktop toggle functionality was baked directly into the task bar in win7/svr2008 and newer via systray.exe. I still exists at the far right of the taskbar even though the image of the screen is no longer shown. – Rowan Hawkins Jan 5 '18 at 0:20
  • @RowanHawkins Yes, but the .scf format has not been similarly retained... – wizzwizz4 Jan 5 '18 at 7:47
8

SCF files are just another form of shortcuts to access various system functions with syntax identical to *.ini files. They are handled by shell32.dll. Parameter 'Command' determines how is the file handled. Possible values:

  1. Posts internal message to windows main process (systray.exe). At a glance it doesn't seem like message with this ID (0x4C8) is handled in explorer.exe or systray.exe, so I might be wrong about who actually receives this message. Nothing seems to happen, so this function is either not fully implemented, or needs additional section with more parameters. Messages with similar IDs seem to invoke power management related functions in systray.exe. Needs more research than I have done.
  2. Passes file to explorer.exe which executes command from [Taskbar] section. Valid values are 'Explorer' and 'ToggleDesktop'.
  3. Executes command from [IE] section. Valid value: 'Channels'

All other values are ignored.

There is also another way to define the icon:

IconFile=<filename>
IconIndex=<index>

Researched on Windows ME, most likely applies to 95 and 98.

  • 1
    This answer contains information that I have not found anywhere else. If no other, more new-info-rich answers are posted I'll accept this one. – wizzwizz4 Mar 15 '17 at 22:34
  • @Algimantas How do you know it is systray.exe message ID 0x4C8? The ID makes sense (WM_USER+0xC8) but a supporting link would be helpful. – snips-n-snails Mar 15 '17 at 22:43
  • 4
    @traal I opened shell32.dll in disassembler, found the code that reads scf files and followed all its branches. – Algimantas Mar 15 '17 at 22:51
  • @Algimantas The old-fashioned way of learning what MS really does, since most of the time the one who did it, didn't document it, so the docs team ignored it. – Gypsy Spellweaver Mar 16 '17 at 2:41
  • 1
    Well, there's almost nothing to document - these files can be used to perform whole 4 different hardcoded tasks. The code is written so that other different sections can be added easily. Since everything that is currently possible to do can also be performed by *.lnk shortcuts, my guess is that *.scf shortcuts were scrapped in favour of *.lnk and these were left "just because they work". – Algimantas Mar 16 '17 at 11:22
9

Articles Q190355 and Q195737 previously available on microsoft.com provided a little documentation about the .scf script file format:

Example 1: Show Desktop (from Q190355):

[Shell]
Command=2
IconFile=explorer.exe,3
[Taskbar]
Command=ToggleDesktop

Example 2: View Channels (from Q195737):

[Shell]
Command=3
IconFile=shdocvw.dll,-118

[IE]
Command=Channels

It looks like the only real customization you can do is to change the icons.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.