Reputation: 51
I need a script that will start Google Chrome and then send a signal for it to go into full screen mode (usually done by hitting f11).
Chrome is installed to the default location.
An example of what I have tried is:
Start-Process -FilePath "C:\Program Files(x86)\Google\Chrome\Application\chrome"
This simple string is not even working for me.
Upvotes: 3
Views: 31944
Reputation: 1
function Get-DesktopApps { Get-Process | Where-Object { $_.MainWindowTitle } | Format-Table ID,Name,Mainwindowtitle –AutoSize }
Upvotes: 0
Reputation: 1
One of the following scripts is sufficient in my Powershell to open Chrome:
Start-Process chrome.exe or Start-Process chrome.exe '--start-maximized' or Start-Process chrome.exe -Wait -WindowStyle Maximized.
However, when you ask for help with the code, please remember to write the operating system you are interested in.
Have fun!
Upvotes: 0
Reputation: 176
Sometimes a temporary folder is needed to get Chrome to start this way, so in those cases this might work.
$pathToChrome = 'C:\Program Files (x86)\Google\Chrome\Application\chrome.exe'
$tempFolder = '--user-data-dir=c:\temp' # pick a temp folder for user data
$startmode = '--start-fullscreen' # '--kiosk' is another option
$startPage = 'https://stackoverflow.com'
Start-Process -FilePath $pathToChrome -ArgumentList $tempFolder, $startmode, $startPage
Upvotes: 12
Reputation: 329
These types of questions are frowned upon due to you not stating what you have tried and you are just asking for a solution.
However since this is simple I couldn't resist.
Start-Process {Your full path to chrome.exe}\chrome.exe -ArgumentList '--start-maximized'
Upvotes: 0