I set Chrome as default brower. To open a URL in Chrome, I wrote:
Process.Start("http://domain.com");
Is any way to open that URL in incognito mode by c# (nomarly press Ctrl + Shift + N)?
I set Chrome as default brower. To open a URL in Chrome, I wrote:
Process.Start("http://domain.com");
Is any way to open that URL in incognito mode by c# (nomarly press Ctrl + Shift + N)?
The path to chrome.exe has changed, or at least i think there is a different between x32 and x64. C:\Program Files (x86)\Google\Chrome\Application\chrome.exe
For anyone using the Brave browser, the solution is very similar to Dan's answer, just with the brave.exe path (note that for Brave, the exe is not located in %LocalAppData%).
var url = "http://www.google.com";
using (var process = new Process())
{
process.StartInfo.FileName = @"C:\Program Files (x86)\BraveSoftware\Brave-Browser\Application\brave.exe";
process.StartInfo.Arguments = url + " --incognito";
process.Start();
}