更新时间:2023-01-31 11:59:58
Copy-Item $sourcepath $destination ## Get the lnk we want to use as a template
$shell = New-Object -COM WScript.Shell
$shortcut = $shell.CreateShortcut($destination) ## Open the lnk
$shortcut.TargetPath = "C:path o
ewexe.exe" ## Make changes
$shortcut.Description = "Our new link" ## This is the "Comment" field
$shortcut.Save() ## Save
在这里找到了 VB 版本的代码:http://www.tutorialized.com/view/tutorial/Extract-the-target-file-from-a-shortcut-file-.lnk/18349
Found the VB version of the code here: http://www.tutorialized.com/view/tutorial/Extract-the-target-file-from-a-shortcut-file-.lnk/18349