Find existing shortcut file for all user desktops
Posted: Mon Dec 12, 2022 3:46 pm
We want to locate the current shortcut links for users on a PC for our app.
Those were installed from Wise installer before we switched to Installaware.
Some users also created their own shortcuts.
Then we want to move or copy shortcut target info to the public desktop
looping thru "Find All Files" result but difficulty using wildcard\get locations we need.
Tried with no success (This SEARCHPATH value returned no result):
Set Localization Variable SEARCHPATH to C:\Users\*\Desktop\OurAppName.lnk
Find All Files in path $SEARCHPATH$ (include subfolders), write result into variable SHORTEXISTPATH
for each Element LOOPSHORTCUTPATH in | delimited Collection of $SHORTEXISTPATH$ do
Next
Issue is I do not know the user profile names to check their desktop
I cannot figure out a combo of wildcard to work.
When I tried this
Set Localization Variable SEARCHPATH to C:\Users\OurAppName.lnk
I get a lot of dummy folders in the result.
Any thoughts?
Those were installed from Wise installer before we switched to Installaware.
Some users also created their own shortcuts.
Then we want to move or copy shortcut target info to the public desktop
looping thru "Find All Files" result but difficulty using wildcard\get locations we need.
Tried with no success (This SEARCHPATH value returned no result):
Set Localization Variable SEARCHPATH to C:\Users\*\Desktop\OurAppName.lnk
Find All Files in path $SEARCHPATH$ (include subfolders), write result into variable SHORTEXISTPATH
for each Element LOOPSHORTCUTPATH in | delimited Collection of $SHORTEXISTPATH$ do
Next
Issue is I do not know the user profile names to check their desktop
I cannot figure out a combo of wildcard to work.
When I tried this
Set Localization Variable SEARCHPATH to C:\Users\OurAppName.lnk
I get a lot of dummy folders in the result.
Any thoughts?