Analysis to show the target path of a shortcut

We would like to determine the target path of a given shortcut.

Name of shortcut: nvision.lnk in the following folder:

%USERPROFILE%\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\PeopleSoft 8.53.11

However the name of the folder PeopleSoft 8.53.11 may differ depending on the version installed.

We are doing this to track the installation of PeopleSoft given that it was not installed via a windows installer package.

This version should work, but it is going to be a bit unwieldy due to the userprofile of the agent is system. As a result, the traversing of all of the users will be quite inefficient and may result in multiple and identical results if the shortcut is in more than one profile.

I am sure there are more efficient ways of doing this, but this would certainly get you started in the right direction.

(pathnames of (shortcuts of (find files “nvision.lnk” of folders of folders ((it & “\AppData\Roaming\Microsoft\Windows\Start Menu\Programs”) of (pathnames of (folders of folder (preceding text of last “” of (value of variable “USERPROFILE” of environment as string))))))))

Be aware that “USERPROFILE” in the environment will be that of the SYSTEM account and on Windows 8 for example is C:\Windows\system32\config\systemprofile which won’t help you much.

Something like

home directories of local users

might give you better results to base that on