Reputation: 31
I want to convert this batch command
start msedge.exe --new-window "https://www.google.com/"
to a vbscript file so I can open it in hidden
I've tried this
Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run """https://www.google.com/""", 0,TRUE
but it only opens on default browser and not open with new window
Any help?
Upvotes: 3
Views: 1743
Reputation: 18827
Instead of trying to replace the batch command, run the batch command via the script like this:
Option Explicit
Dim MyCommand, WshShell
MyCommand = "cmd /c start msedge.exe --new-window ""https://www.google.com/"""
Set WshShell = CreateObject("WScript.Shell")
WshShell.Run MyCommand, 0, True
Upvotes: 2