Hacker News new | ask | show | jobs
by mappu 2961 days ago
> can you do "find HKEY_CURRENT_USER -name mypackage"

Powershell comes with a kind of FUSE mount for the registry:

    PS C:\> Set-Location HKCU:
    PS HKCU:\> Get-ChildItem -Recurse | where-object { $_.Name -match "HeidiSQL" }
2 comments

Or for those who come from Unixland and see way too much typing, PowerShell has aliases that make this much shorter:

    cd HKCU:
    ls -r -i *HeidiSQL*
Or if you really want to use the match operator, regex, or other expression, you can still pipe it through the Where-Object alias:

    ls -r | ? {$_.Name -match "HeidiSQL"}
Just to make sure everyone on HN knows you can get real pithy with PowerShell, this also works:

  PS C:\> cd hkcu:
  PS HKCU:\> ls -r | ? name -m 'HeidiSQL'