Skip to content

Commit

Permalink
Remove escaped quotes from windows registry queries (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
bretambrose committed Jul 22, 2021
1 parent 4d7ff21 commit 272c7ef
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/vsDetect.js
Expand Up @@ -41,7 +41,7 @@ let vsDetect = {
key = "HKLM\\SOFTWARE\\Classes\\Installer\\Dependencies\\Microsoft.VS.VisualCppBuildTools_x86_enu,v" + mainVer;
testPhrase = "Visual C++";
}
let command = ["reg", "query", "\"" + key + "\""];
let command = ["reg", "query", key];
try {
let stdout = await processHelpers.execFile(command);
return stdout && stdout.indexOf(testPhrase) > 0;
Expand All @@ -55,7 +55,7 @@ let vsDetect = {
_isVSInstalled: async function (version) {
// On x64 this will look for x64 keys only, but if VS and compilers installed properly,
// it will write it's keys to 64 bit registry as well.
let command = ["reg", "query", "\"HKLM\\Software\\Microsoft\\VisualStudio\\" + version + "\""];
let command = ["reg", "query", "HKLM\\Software\\Microsoft\\VisualStudio\\" + version];
try {
let stdout = await processHelpers.execFile(command);
if (stdout) {
Expand All @@ -75,7 +75,7 @@ let vsDetect = {

_isVSvNextInstalled: async function (version) {
let mainVer = version.split(".")[0];
let command = ["reg", "query", "\"HKLM\\SOFTWARE\\Classes\\Installer\\Dependencies\\Microsoft.VisualStudio.MinShell.Msi,v" + mainVer + "\""];
let command = ["reg", "query", "HKLM\\SOFTWARE\\Classes\\Installer\\Dependencies\\Microsoft.VisualStudio.MinShell.Msi,v" + mainVer];
try {
let stdout = await processHelpers.execFile(command);
if (stdout) {
Expand Down

0 comments on commit 272c7ef

Please sign in to comment.