I'm expanding on a little programming work I'm doing, and I'm using process.start() to open chrome in incognito mode, but I also want it to open a url in the incognito mode. This is my code:
Dim chrome As String = "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe"
Dim param As String = "/incognito"
Dim sURL As String = txtCustomURL.Text
You are calling Process.Start twice:
You need to launch Chrome.exe with two parameters:
/incognito, and the url to open.
Chrome (and most other programs) accept parameters separated by spaces. So the format of your parameters should end up like
Therefore, try passing chrome a string consisting of
param, a space, and then the URL, concatenated together with
Process.Start(chrome, param + " " + sURL)