# Run before opening Chrome # get Chrome Process if ((Get-Process "chrome" -ErrorAction SilentlyContinue) -eq $Null) { echo "Google Chrome Not Running" } else{ echo "Running" taskkill /f /IM "chrome.exe" Sleep 3 } start-Sleep -Seconds 5 echo "" echo "******************************************" echo "*Clearing Cache, Credentials & Login Data*" echo "******************************************" $Items = @('Cache\*', 'Cookies', 'Login Data') $Folder = "$($env:LOCALAPPDATA)\Google\Chrome\User Data\Default" $Items | % { if (Test-Path "$Folder\$_") { ls "$Folder\$_" Remove-Item "$Folder\$_" } } echo "" echo "***************************" echo "*Poweshell Script Complete*" echo "*Starting Google Chrome *" echo "***************************" echo "" #$FolderC ="$($env:LOCALAPPDATA)\Google\Chrome\Application" cd 'C:\Program Files\Google\Chrome\Application' #& ./chrome.exe 'www.google.com' #Test-Path "$FolderC" .\chrome.exe
Friday, January 29, 2021
Powershell Script to start and clean Google Chrome
Subscribe to:
Post Comments (Atom)
Gammon => Ham Calculator V1.0
def ham_cooking_time (grams): """ Calculates the cooking time for a ham based on its weight. Args: g...
-
def ham_cooking_time (grams): """ Calculates the cooking time for a ham based on its weight. Args: g...
-
import random class EuroMillions : """Generates a random EuroMillions ticket with no duplicate numbers.""...
-
import random import string # To be extended one bit at a time lottery_numbers_picked = 1033458226 lottery = [ "1" , ...
No comments:
Post a Comment