2
我有一個PowerShell腳本,用於打開Internet Explorer中的某個鏈接。到目前爲止,我有以下代碼。它會打開鏈接,但當我特別需要它在Internet Explorer中打開時,它會發送到我的默認瀏覽器。如何爲Internet Explorer創建URL快捷方式
$Shell = New-Object -ComObject ("WScript.Shell")
$ShortCut = $Shell.CreateShortcut($env:USERPROFILE + "\Desktop\TMW.lnk")
$ShortCut.TargetPath="http://tmw1.casttrans.com/rdweb"
$ShortCut.WorkingDirectory = "C:\Program Files (x86)\Internet Explorer";
$ShortCut.WindowStyle = 1;
$ShortCut.IconLocation = "iexplore.exe, 0";
$ShortCut.Save()
而不是做一個URL快捷方式,你需要做一個'iexplore.exe'的快捷方式並將網站作爲參數傳遞。 – BenH