I have found a bad VBS way to do this, but I have done a native POAS process to edit properties Searching for a .LNK file is aiming to reach remote machines, duplicate an existing shortcut with most current properties, and some of them have to be edited.
If it's easy to write a new shortcut file, then do the job too.
per-item $ sourcepath $ destination ## We want to get the lnk template $ Shell = New-Object-Com Use as WScript. Shell $ shortcut = $ shell.CreateShortcut ($ destination) ## Open the LNK $ shortcut. TargetPath = "C: \ path \ to \ new \ exe.exe" ## Change $ Shortcut. Description = "our new link" ## This "comment" field is $ shortcut. Save () ## Save
The VB version of the code was found here:
Comments
Post a Comment