A
A
Alexander Gamov2014-11-26 09:28:20
PowerShell
Alexander Gamov, 2014-11-26 09:28:20

How to edit shortcut with ps ?

The essence of the task is that the user has a shortcut on the desktop, and when the script is launched, information is added to the address of the shortcut.
I found many examples with all sorts of massive recursive label replacements, etc. but these options are not suitable, because. want something simple

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Ruchkin, 2014-11-26
@slowdream

$wsh = New-Object -ComObject WScript.Shell
$lnk = $wsh.CreateShortcut("some.lnk");
$lnk.TargetPath = "hoho";
$lnk.Save();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question