Skip to content

Instantly share code, notes, and snippets.

@marlo22
Last active April 14, 2021 15:33
Show Gist options
  • Save marlo22/dcd4ba9dc6f968e9696eac5af855b334 to your computer and use it in GitHub Desktop.
Save marlo22/dcd4ba9dc6f968e9696eac5af855b334 to your computer and use it in GitHub Desktop.
WinRegistry
"use strict";
var __importDefault = (this && this.__importDefault) || function (mod) {
return (mod && mod.__esModule) ? mod : { "default": mod };
};
Object.defineProperty(exports, "__esModule", { value: true });
const regedit_1 = __importDefault(require("regedit"));
const os_1 = __importDefault(require("os"));
const architecture = os_1.default.arch();
const path = architecture === 'x64' ? 'HKLM\\Software\\Wow6432Node\\Google\\Chrome\\Extensions\\kjjmmomgbglgdjaecbakemnmhoeebndj' : 'HKLM\Software\Google\Chrome\Extensions\kjjmmomgbglgdjaecbakemnmhoeebndj';
// regedit.list('HKLM\\Software\\Wow6432Node\\Google\\Chrome\\', (err, result) => {
// if (err) return;
// regedit.list('HKLM\\Software\\Wow6432Node\\Google\\Chrome\\Extensions\\', (err) => {
// if (err) {
// }
// });
// });
regedit_1.default.createKey('HKLM\\Software\\Wow6432Node\\Google\\Chrome\\', (err) => {
console.log('aaaaaaaa', err);
if (err)
return;
});
// regedit.putValue({
// [path]: {
// update_url: {
// value: 'https://clients2.google.com/service/update2/crx',
// type: 'REG_SZ'
// }
// }
// }, console.log);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment