I’m not sure why people try to associate shortcuts (.lnk files) with different programs using the Default Programs applet in Windows 7/Vista. Doing so would break the functionality of Shortcuts, and you need to edit the registry manually or apply the .lnk file association fix (Windows 7 / Vista) to straighten things up. And why in the first place does Default Programs allow users to change the setting for .lnk and other system file types? .lnk, .exe, .com …etc. are system file types should not be associated with any application. Windows knows how to handle them.

How to warn users when they try to change the .lnk association

If you’re a system administrator, you can add a warning so that the user is cautioned when attempting to change the .lnk file type association. This is possible using the NoOpen registry value.

1. Click Start, type Regedit.exe and navigate to the following key:

HKEY_CLASSES_ROOT\lnkfile

2. In the right-pane, create a new String value named NoOpen

3. Double-click NoOpen and type a phrase there. This note will be displayed to the user when attempting to change the .lnk associations.

(If you don’t assign any data for the NoOpen value, the system default warning will be shown.)

4. Exit the Registry Editor.

REGISTRY FIX

To automate the above setting, download lnk-noopen.zip. Unzip and extract the contents to a folder and run the file lnk-noopen.reg. To reverse the setting, run the undo.reg file.

Note that despite the warning, users will still be able associate the said file type by clicking the Open With… button in the above dialog box.

MORE INFORMATION

The NoOpen value will be ignored if there is at least one action defined for the file type. By default, there are no actions defined for lnkfile in Windows 7/Vista. If you install a software (for example ShellRunas) that adds an action for .lnk file types, the NoOpen value will be ignored by Windows.


Email SubscriptionPrefer an E-mail subscription?

Enter your email address:

Delivered by FeedBurner

3 Comments

  1. Brendan John
    said this on Wednesday, June 6th 2012 9:02 pm

    You are back at last !!

  2. said this on Wednesday, June 6th 2012 8:50 am

    Thanks anon :)

  3. xpclient
    said this on Tuesday, June 5th 2012 4:51 pm

    Good to see you blogging again. Your shell-related tips are awesome.

Leave a Reply