Skip to content

Instantly share code, notes, and snippets.

@MikeeI
Forked from seieric/chromeautologin.ps1
Created May 9, 2023 18:54
Show Gist options
  • Save MikeeI/e50c64e0a716a47f4d7a327dbd58a60d to your computer and use it in GitHub Desktop.
Save MikeeI/e50c64e0a716a47f4d7a327dbd58a60d to your computer and use it in GitHub Desktop.
Google Chromeに1クリックで自動的にログイン / Log in to Google Chrome automatically with only one click (PowerShell)
Add-Type -AssemblyName System.Windows.Forms;
$login_email = "example@gmail.com"; #Your login e-mail address
$passwd = "example_password"; #Your password
Start-Process chrome.exe -ArgumentList "https://accounts.google.com/signin/chrome/sync/identifier?ssp=1&continue=https%3A%2F%2Fwww.google.com%2F&flowName=GlifDesktopChromeSync" -PassThru;
Start-Sleep -s 3;
[System.Windows.Forms.SendKeys]::SendWait($login_email);
Start-Sleep -m 100;
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}");
Start-Sleep -m 1500;
[System.Windows.Forms.SendKeys]::SendWait($passwd);
Start-Sleep -m 100;
[System.Windows.Forms.SendKeys]::SendWait("{ENTER}");
Start-Sleep -m 1500;
[System.Windows.Forms.MessageBox]::Show("Logged in!", "Google Chrome", "OK", "Information");
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment