Relevance for Target Address of .lnk file

We have shortcuts that point to a certain program which contain different perameters/switches within the target address.
Example: “C:\Program Files (x86)\Our Program\Program.exe” /N “Naming” /Y user config

Whenever I use relevance like “pathname of shortcut of file” it only outputs “C:\Program Files (x86)\Our Program\Program.exe”

Is there a relevance statement that would give me EVERYTHING within the Target field of the .lnk?

Check the file shortcut inspector: https://developer.bigfix.com/relevance/reference/file-shortcut.html

Maybe argument string will return the arguments used?

2 Likes

That works, thank you Martin!

Now that I know how to tell if a shortcut does not contain something within the argument string, is there a way to add something to it if it’s missing?

Here is the relevance for finding any .lnk files that do not contain /SSL in the argument string:

(Pathname of it) of descendants whose(name of it as lowercase ends with “.lnk” AND (Pathname of shortcut of it as lowercase contains “tn5250.exe” AND Argument string of shortcut of it does not contain "/SSL")) of (folders “Desktop” of it;folders “Documents” of it;folders “AppData\Roaming\Microsoft\Windows\Start Menu” of it;folders “AppData\Roaming\Microsoft\Internet Explorer\Quick Launch” of it) of folders of folder “C:\Users”

Output:
C:\Users\TestUser\Desktop\Shortcut.lnk

In my environment we use a vbscript based on the info at https://support.microsoft.com/en-us/help/244677/how-to-create-a-desktop-shortcut-with-the-windows-script-host

1 Like

We need to add something to the argument string of existing .lnk files in which we do not know the names of.