How to Show a Warning Message When Users Try to Modify LNK File Association in Windows 7 and Vista

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:


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.


To automate the above setting, download 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.


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.

About the author

Ramesh Srinivasan founded back in 2005. He is passionate about Microsoft technologies and has a vast experience in the ITeS industry — delivering support for Microsoft's consumer products. He has been a Microsoft MVP [2003 to 2012] who contributes to various Windows support forums.

3 thoughts on “How to Show a Warning Message When Users Try to Modify LNK File Association in Windows 7 and Vista

Comments are closed.