How to use the registry-js.HKEY.HKEY_LOCAL_MACHINE function in registry-js

To help you get started, we’ve selected a few registry-js examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github desktop / desktop / app / src / lib / editors / win32.ts View on Github external
},
        // 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)
github desktop / desktop / app / src / lib / editors / win32.ts View on Github external
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}`)
  }
}
github desktop / desktop / app / src / lib / shells / win32.ts View on Github external
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 (
github desktop / desktop / app / src / lib / shells / win32.ts View on Github external
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}'`
github desktop / desktop / app / src / lib / ssh / ssh-environment.ts View on Github external
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}'`
github bytedance / debugtron / src / main / win.ts View on Github external
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)),
    )
  }
github bytedance / debugtron / src / main / win.ts View on Github external
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)),
    )
  }
github MHeasell / rwe / launcher / src / launcher / util.ts View on Github external
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",

registry-js

A simple and opinionated library for working with the Windows registry

MIT
Latest version published 2 months ago

Package Health Score

73 / 100
Full package analysis

Similar packages