S:\ is a mapped network drive. Non-admin user needs elevation to create the shortcut, which means S:\ mapped drive no longer exists.
Code: Select all
FileCreateShortcut, "S:\IT - Software\Tools\AppName.exe", %A_ProgramsCommon%\AppName\Update now.lnk
Created shortcut path is:
with quotes removed and spaces changes into underscores
When S:\ drive exists, shortcut is created as expected, including quotes
Help files says:
but maybe the folder does??The file does not have to exist at the time the shortcut is created; in other words, shortcuts to invalid targets can be created.