Skip to content

Instantly share code, notes, and snippets.

View tolgatasci's full-sized avatar
👨‍💼

Tolga tolgatasci

👨‍💼
  • istanbul
  • 10:19 (UTC -12:00)
View GitHub Profile
@JustinBeckwith
JustinBeckwith / gist:5260480
Created March 28, 2013 03:58
Ask a user to install a Chrome extension given an extensionID from C#
var chromeAppDataPath = Path.Combine(Environment.GetEnvironmentVariable("localappdata"), @"Google\Chrome");
var chromeExtensionId = "clopmcfjibhgfnagfneonflajbjidfai";
if (Directory.Exists(chromeAppDataPath))
{
var extensionsPath = Path.Combine(chromeAppDataPath, @"User Data\Default\Extensions\" + chromeExtensionId);
if (!Directory.Exists(extensionsPath))
{
Process.Start(new ProcessStartInfo()
{
FileName = Path.Combine(chromeAppDataPath, @"Application\chrome.exe"),