首页 > 解决方案 > 在 Powershell 中打开 CMD 命令

问题描述

我正在尝试在 powershell 脚本中从批处理中打开使用此命令:

"C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -kiosk http://praxistipps.chip.de/ --overscroll-history-navigation=0 --window-position=0,0

所以我尝试了这个但没有成功:

Start-Process -FilePath "cmd.exe"  -ArgumentList "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -kiosk http://praxistipps.chip.de/ --overscroll-history-navigation=0 --window-position=0,0

标签: powershellbatch-filepowershell-3.0

解决方案


为什么不直接调用chrome呢?

Start-Process -FilePath "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" -ArgumentList "-kiosk", "http://praxistipps.chip.de/", "--overscroll-history-navigation=0", "--window-position=0,0"

推荐阅读