Skip to main content

7 posts tagged with "Windows"

View All Tags

· One min read

PowerShell

$ws = New-Object -ComObject WScript.Shell
$ws.CurrentDirectory = $PWD
$s = $ws.CreateShortcut('url.lnk')
$s.TargetPath = 'http://example.com'
# $s.TargetPath = 'file.txt'
$s.Save()