Answered
Hi. I can get the target of a shortcut Lnk file like this:
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Google Chrome.lnk")
write-host $Shortcut.TargetPath
But it doesn’t work for advertised shortcuts. Does anybody know how to get the target path of an advertised shortcut? Thanks.
- MSIGuy asked 2 years ago
- last edited 2 years ago
- You must login to post comments
Best Answer
Hi.
Thankfully it’s not too difficult – take a look at how you can use PowerShell to find an advertised shortcut target .
Kae.
- Kae answered 2 years ago
- You must login to post comments
Your Answer
Please login first to submit.