Last active
March 7, 2017 21:41
-
-
Save NathanTheGr8/d1f0c6fa2a01a7c4008f62fc54f4bcc6 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##Add extension reg | |
$chromepath32 = "HKLM:\Software\Google\Chrome\Extensions" | |
$chromepath64 = "HKLM:\Software\Wow6432Node\Google\Chrome\Extensions" | |
$extension_id = "haiffjcadagjlijoggckpgfnoeiflnem" | |
if ($is64bit) { | |
if (-not(Test-Path "HKLM:\Software\Wow6432Node\Google")){ | |
New-Item "HKLM:\Software\Wow6432Node" -Name "Google" | |
} | |
if (-not(Test-Path "HKLM:\Software\Wow6432Node\Google\Chrome")){ | |
New-Item "HKLM:\Software\Wow6432Node\Google" -Name "Chrome" | |
} | |
if (-not(Test-Path "HKLM:\Software\Wow6432Node\Google\Chrome\Extensions")){ | |
New-Item "HKLM:\Software\Wow6432Node\Google\Chrome" -Name "Extensions" | |
} | |
if (-not(Test-Path $chromepath64\$extension_id)){ | |
New-Item $chromepath64 -Name $extension_id | |
} | |
Set-Location "$chromepath64\$extension_id" | |
New-ItemProperty -Path . -Name "update_url" -Value "https://clients2.google.com/service/update2/crx" -Force | Out-Null | |
} | |
else { | |
if (-not(Test-Path "HKLM:\Software\Google")){ | |
New-Item "HKLM:\Software" -Name "Google" | |
} | |
if (-not(Test-Path "HKLM:\Software\Google\Chrome")){ | |
New-Item "HKLM:\Software\Google" -Name "Chrome" | |
} | |
if (-not(Test-Path "HKLM:\Software\Google\Chrome\Extensions")){ | |
New-Item "HKLM:\Software\Google\Chrome" -Name "Extensions" | |
} | |
if (-not(Test-Path $chromepath32\$extension_id)){ | |
New-Item $chromepath32 -Name $extension_id | |
} | |
Set-Location "$chromepath32\$extension_id" | |
New-ItemProperty -Path . -Name "update_url" -Value "https://clients2.google.com/service/update2/crx" -Force | Out-Null | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Learn how to get extension id and update_url at https://developer.chrome.com/extensions/external_extensions