VBS - 如何 运行 两个浏览器一个全屏另一个最小化?

VBS - how to run two browser one is full screen and another is minimised?

我有一个售货亭,我需要 运行 Chrome.exe 作为 --kiosk 和另一个 Chrome.exe 最小化。使用 regedit 运行 方法执行 VBS。

问题出在重启时,它总是被最小化 chrome.exe 搞得一团糟,无法像最小化那样启动,它总是显示在 --kiosk 模式之上。

我怎么能 100% 确定当执行 VBS 时,一个 chrome 是 运行ning 最小化,另一个是 --kiosk 模式?

Dim url
Dim shell

-- Part 1 - "has to run as --kiosk, always on screen never ever exit from the display screen"
url = "www.whosebug.com"
Set shell = CreateObject("Shell.Application")
shell.ShellExecute "chrome.exe", url, "", "", 1

-- Part 2 - "has to run as minimised when PC starts and VBS is executed, it should never ever pretend to show on screen."
url = "www.icanhazip.com"
Set shell = CreateObject("Shell.Application")
shell.ShellExecute "chrome.exe", url, "", "", 1

这个脚本对我不起作用,谁能帮帮我?

不要用Shell.Application,用WScript.ShellRun方法。这里我假设 chrome.exe 在路径上或在当前工作目录中:

Option Explicit

With CreateObject("WScript.Shell")
  Call .Run("chrome.exe www.icanhazip.com", 6, false)
  Call .Run("chrome.exe --kiosk www.whosebug.com", 1, false)
End With

第二个参数是window样式。

Documentation Here