Windows – How to prevent Windows 10 removing desktop shortcut parameters

desktopshortcutswindows 10

Something(??) zapped the parameters on ALL my shortcuts recently.

For example, a shortcut such as:

 "%JAVA_HOME%\java" -jar myApp.jar

Stopped working, because it had been modified to:

 "%JAVA_HOME%\java" 

No more parameters. šŸ™ Reconstructing them took quite some time and I'd like to prevent needing to go through that again.

Can you say …

  • What tool / update or whatever may have caused this?
  • Offer a method to prevent that happening again?

    • Clearly, I need to ensure my desktop keeps getting backed-up (too).
    • I'd prefer at the same time to NOT have to delve into backups if I can prevent the wipe in the first instance.
      Many thanks in advance.
    • Finally, do you know of a tool that will let me (re-)create shortcuts from CMD file. May be something like:

    make-shortcut "command line" "start-location" ["icon-path"]

Hopefully that conveys the idea.

possibly related:

Best Answer

A number of Windows 10 updates have caused different issues with shortcuts, in addition to the one you mentioned:

  1. Shortcuts have been restricted to work only in specific folders.

  2. Keyboard shortcuts set for .lnk shortcuts may no longer work.

Third-party tools such as Classic Shell and alternatives allow links to be placed in other folders, or set within the shell environment.

Moving the .lnk files out of the folders managed by Microsoft during Windows updates should, hopefully, protect the links from mangling.

Other tools such as Clavier+ and alternatives supplement keyboard shortcuts. Clavier+, for example, keeps its settings in an .ini file and also enables exporting and importing settings, simplifying repair or setup of a new system. Links (including passed command-line parameters) can be tested as they are entered.

Clavier+ settings dlg

Related Question