Dav*_*one 1 powershell multiple-browsers
我想使用隐身/私密模式使用 IE、CH 和 FF 打开单个 URL。
我可以使用此 Powershell 脚本通过 3 个浏览器打开该 url:
Param(
[string] $url
)
[System.Diagnostics.Process]::Start("chrome.exe", $url)
[System.Diagnostics.Process]::Start("firefox.exe",$url )
$IE=new-object -com internetexplorer.application
$IE.navigate2($url)
$IE.visible=$true
Run Code Online (Sandbox Code Playgroud)
如何以隐身模式打开浏览器?
chrome.exe采用--incognito命令行选项:
[System.Diagnostics.Process]::Start("chrome.exe","--incognito $url")
Run Code Online (Sandbox Code Playgroud)
同样,firefox.exe采用-private-window命令行选项:
[System.Diagnostics.Process]::Start("firefox.exe","-private-window $url")
Run Code Online (Sandbox Code Playgroud)
正如 @TToni 在评论中指出的,iexplore.exe等效项是-private:
[System.Diagnostics.Process]::Start("iexplore.exe","$url -private")
Run Code Online (Sandbox Code Playgroud)
com对象InternetExplorer.Application不支持 InPrivate 浏览 AFAIK
| 归档时间: |
|
| 查看次数: |
8730 次 |
| 最近记录: |