for a permanent change you may use this commands:
user-wide (for current user):
setx pathext %pathext%;.lnk
system-wide (for all users on the machine):
setx /m pathext %pathext%;.lnk
setx
makes environment variable instead of session variable, which exists only in the cmd.exe
process where it is set
another solution is to use mklink
to create symlink (symbolic link) instead of shortcuts
eg:
mklink test.exe "c:\program files\application\test.exe"
symlinks don't have .lnk
extension and size
ps:
after using the above mentioned setx
commands you can find your variables here in the environment variables window which can be displayed using this command:
rundll32 sysdm.cpl,EditEnvironmentVariables
pps:
unlike set
, setx
is an external command, ie an executable file, which is located at c:\windows\system32
folder by default, and thus may not exist in some versions or editions of windows