Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
},
// 64-bit version of SlickEdit Pro 2017
{
key: HKEY.HKEY_LOCAL_MACHINE,
subKey:
'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{15406187-F49E-4822-CAF2-1D25C0C83BA2}',
},
// 32-bit version of SlickEdit Pro 2017
{
key: HKEY.HKEY_LOCAL_MACHINE,
subKey:
'SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{15006187-F49E-4822-CAF2-1D25C0C83BA2}',
},
// 64-bit version of SlickEdit Pro 2016 (21.0.1)
{
key: HKEY.HKEY_LOCAL_MACHINE,
subKey:
'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{10C06187-F49E-4822-CAF2-1D25C0C83BA2}',
},
// 64-bit version of SlickEdit Pro 2016 (21.0.0)
{
key: HKEY.HKEY_LOCAL_MACHINE,
subKey:
'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{10406187-F49E-4822-CAF2-1D25C0C83BA2}',
},
// 64-bit version of SlickEdit Pro 2015 (20.0.3)
{
key: HKEY.HKEY_LOCAL_MACHINE,
subKey:
'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{0DC06187-F49E-4822-CAF2-1D25C0C83BA2}',
},
// 64-bit version of SlickEdit Pro 2015 (20.0.2)
key: HKEY.HKEY_LOCAL_MACHINE,
subKey:
'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{0D406187-F49E-4822-CAF2-1D25C0C83BA2}',
},
// 64-bit version of SlickEdit Pro 2014 (19.0.2)
{
key: HKEY.HKEY_LOCAL_MACHINE,
subKey:
'SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\{7CC0E567-ACD6-41E8-95DA-154CEEDB0A18}',
},
]
case ExternalEditor.Webstorm:
return [
// 32-bit version of WebStorm
{
key: HKEY.HKEY_LOCAL_MACHINE,
subKey:
'SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\WebStorm 2018.3',
},
]
default:
return assertNever(editor, `Unknown external editor: ${editor}`)
}
}
async function findPowerShell(): Promise {
const powerShell = enumerateValues(
HKEY.HKEY_LOCAL_MACHINE,
'Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\PowerShell.exe'
)
if (powerShell.length === 0) {
return null
}
const first = powerShell[0]
// NOTE:
// on Windows 7 these are both REG_SZ, which technically isn't supposed
// to contain unexpanded references to environment variables. But given
// it's also %SystemRoot% and we do the expanding here I think this is
// a fine workaround to do to support the maximum number of setups.
if (
async function findGitBash(): Promise {
const registryPath = enumerateValues(
HKEY.HKEY_LOCAL_MACHINE,
'SOFTWARE\\GitForWindows'
)
if (registryPath.length === 0) {
return null
}
const installPathEntry = registryPath.find(e => e.name === 'InstallPath')
if (installPathEntry && installPathEntry.type === RegistryValueType.REG_SZ) {
const path = Path.join(installPathEntry.data, 'git-bash.exe')
if (await pathExists(path)) {
return path
} else {
log.debug(
`[Git Bash] registry entry found but does not exist at '${path}'`
async function findGitForWindowsInstall(): Promise {
const registryPath = enumerateValues(
HKEY.HKEY_LOCAL_MACHINE,
'SOFTWARE\\GitForWindows'
)
if (registryPath.length === 0) {
return null
}
const installPathEntry = registryPath.find(e => e.name === 'InstallPath')
if (installPathEntry && installPathEntry.type === RegistryValueType.REG_SZ) {
const path = Path.join(installPathEntry.data, 'git-bash.exe')
if (await pathExists(path)) {
return installPathEntry.data
} else {
log.debug(
`[hasGitForWindowsInstall] registry entry found but git-bash.exe does not exist at '${path}'`
async readApps() {
const items = [
...this.enumRegeditItems(
HKEY.HKEY_LOCAL_MACHINE,
'Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
),
...this.enumRegeditItems(
HKEY.HKEY_LOCAL_MACHINE,
'Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
),
...this.enumRegeditItems(
HKEY.HKEY_CURRENT_USER,
'Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
),
]
return Promise.all(
items.map(itemValues => this.getAppInfoFromRegeditItemValues(itemValues)),
)
}
async readApps() {
const items = [
...this.enumRegeditItems(
HKEY.HKEY_LOCAL_MACHINE,
'Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
),
...this.enumRegeditItems(
HKEY.HKEY_LOCAL_MACHINE,
'Software\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
),
...this.enumRegeditItems(
HKEY.HKEY_CURRENT_USER,
'Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall',
),
]
return Promise.all(
items.map(itemValues => this.getAppInfoFromRegeditItemValues(itemValues)),
)
}
HKEY.HKEY_LOCAL_MACHINE,
"SOFTWARE\\Wow6432Node\\GOG.com\\GOGTOTALANNIHILATIONBT",
"PATH",
],
[
HKEY.HKEY_LOCAL_MACHINE,
"SOFTWARE\\Wow6432Node\\GOG.com\\GOGTOTALANNIHILATIONCC",
"PATH",
],
[
HKEY.HKEY_LOCAL_MACHINE,
"SOFTWARE\\Microsoft\\DirectPlay\\Applications\\Total Annihilation",
"Path",
],
[
HKEY.HKEY_LOCAL_MACHINE,
"SOFTWARE\\Wow6432Node\\Microsoft\\DirectPlay\\Applications\\Total Annihilation",
"Path",
],
[
HKEY.HKEY_LOCAL_MACHINE,
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GOGPACKTOTALANNIHILATIONCOMMANDERPACK_is1",
"InstallLocation",
],
[
HKEY.HKEY_LOCAL_MACHINE,
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\GOGPACKTOTALANNIHILATIONCOMMANDERPACK_is1",
"InstallLocation",
],
[
HKEY.HKEY_LOCAL_MACHINE,
"HKEY_LOCAL_MACHINE\\SOFTWARE\\Wow6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Total Annihilation",