15 lines
288 B
PowerShell
15 lines
288 B
PowerShell
|
param (
|
||
|
[string] $name,
|
||
|
[string] $url
|
||
|
)
|
||
|
|
||
|
$url = $url
|
||
|
$name = $name
|
||
|
$Shell = New-Object -ComObject ("WScript.Shell")
|
||
|
$ShortCut = $Shell.CreateShortcut("$env:Public\Desktop\$name.url")
|
||
|
$ShortCut.TargetPath="$url"
|
||
|
$ShortCut.Save()
|
||
|
|
||
|
|
||
|
# arguements: -name {{shortcut name}} -url {{url}}
|