Retoxx
Retoxx

Reputation: 33

Is there a way to automatically open the "About" page of a Chromium based browser with PowerShell compatible code?

I am simply trying to code something that can either launch the Chrome browser to the "about" page; or open a tab with the "about" page, that will run in PowerShell.

I have tried the following, and it only results in chrome opening for a short second, and then closing...

`

Start-Process -FilePath "C:\Program Files\Google\Chrome\Application\chrome.exe" -ArgumentList '"chrome://about"'

`

This works with any HTTP/S: location, but I think it doesn't like the 'Chrome:' tag.

... Any ideas?

Upvotes: 0

Views: 174

Answers (1)

postanote
postanote

Reputation: 16116

It's because that landing page/tab is not a legit URL. So you can do this (though well, you know, SendKeys ...).

Add-Type -AssemblyName System.Windows.Forms
Start-Process -FilePath 'C:\Program Files\Google\Chrome\Application\chrome.exe'
Start-Sleep -Milliseconds 300
[System.Windows.Forms.SendKeys]::SendWait('chrome://about{Enter}')

Upvotes: 1

Related Questions