创建快捷方式

$shell = New-Object -ComObject WScript.Shell
$desktop = [System.Environment]::GetFolderPath('Desktop')
$shortcut = $shell.CreateShortcut("$desktop\SmartPanel.lnk")
$shortcut.TargetPath = "calc.exe"
$shortcut.IconLocation = "shell32.dll,22"
$shortcut.Save()

 

posted @ 2015-05-11 09:50  dongdonggeorge  阅读(155)  评论(0编辑  收藏  举报