mirror of
https://github.com/bitwarden/desktop.git
synced 2024-11-24 11:55:50 +01:00
Potentially improve path detection of regedit vbs files (#1288)
This commit is contained in:
parent
94b561382d
commit
166c459da4
@ -244,9 +244,15 @@ export class NativeMessagingMain {
|
||||
return this.exePath;
|
||||
}
|
||||
|
||||
private async createWindowsRegistry(check: string, location: string, jsonFile: string) {
|
||||
private getRegeditInstance() {
|
||||
const regedit = require("regedit");
|
||||
regedit.setExternalVBSLocation("resources/regedit/vbs");
|
||||
regedit.setExternalVBSLocation(path.join(path.dirname(this.exePath), "resources/regedit/vbs"));
|
||||
|
||||
return regedit;
|
||||
}
|
||||
|
||||
private async createWindowsRegistry(check: string, location: string, jsonFile: string) {
|
||||
const regedit = this.getRegeditInstance();
|
||||
|
||||
const list = util.promisify(regedit.list);
|
||||
const createKey = util.promisify(regedit.createKey);
|
||||
@ -281,7 +287,7 @@ export class NativeMessagingMain {
|
||||
}
|
||||
|
||||
private async deleteWindowsRegistry(key: string) {
|
||||
const regedit = require("regedit");
|
||||
const regedit = this.getRegeditInstance();
|
||||
|
||||
const list = util.promisify(regedit.list);
|
||||
const deleteKey = util.promisify(regedit.deleteKey);
|
||||
|
Loading…
Reference in New Issue
Block a user