
# get args
Param($link_from_file,$link_name,$work_dir)

#Write-Host "0:"
#Write-Host "$link_from_file"
#Write-Host "1:"
#Write-Host "$link_name"
#Write-Host "2:"
#Write-Host "$work_dir"

$link_to = [System.Environment]::GetFolderPath("Desktop") + "\" + $link_name

# create shortcut
$wso = New-Object -ComObject WScript.Shell
$shortcut = $wso.CreateShortcut($link_to)
$shortcut.TargetPath = $link_from_file
$shortcut.WorkingDirectory = $work_dir
$shortcut.Save()

