Powershell script to start Chrome and more

前端 未结 2 1285
星月不相逢
星月不相逢 2021-01-15 22:06

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 def

相关标签:
2条回答
  • 2021-01-15 22:09

    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'

    0 讨论(0)
  • 2021-01-15 22:35

    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
    
    0 讨论(0)
提交回复
热议问题