FSharp.Management


The Registry type provider

This tutorial shows the use of the registry type provider.

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
// reference the type provider dll
#r "FSharp.Management.dll"
open FSharp.Management

// use the registry type provider to get typed access to your registry and browse it via Intellisense
Registry.HKEY_CURRENT_USER.Path 
val it : string = "HKEY_CURRENT_USER"

Registry.HKEY_LOCAL_MACHINE.SOFTWARE.Microsoft.Path
val it : string = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft"

alt text

namespace FSharp
namespace FSharp.Management
type Registry =
  nested type HKEY_CLASSES_ROOT
  nested type HKEY_CURRENT_CONFIG
  nested type HKEY_CURRENT_USER
  nested type HKEY_LOCAL_MACHINE
  nested type HKEY_PERFORMANCE_DATA
  nested type HKEY_USERS

Full name: FSharp.Management.Registry
type HKEY_CURRENT_USER =
  static val Path : string
  nested type AppEvents
  nested type Console
  nested type ControlPanel
  nested type EUDC
  nested type Environment
  nested type KeyboardLayout
  nested type Printers
  nested type Software
  nested type System
  ...

Full name: FSharp.Management.Registry.HKEY_CURRENT_USER


A strongly typed interface to 'HKEY_CURRENT_USER'
field Registry.HKEY_CURRENT_USER.Path = "HKEY_CURRENT_USER"
type HKEY_LOCAL_MACHINE =
  static val Path : string
  nested type HARDWARE
  nested type SAM
  nested type SOFTWARE
  nested type SYSTEM

Full name: FSharp.Management.Registry.HKEY_LOCAL_MACHINE


A strongly typed interface to 'HKEY_LOCAL_MACHINE'
type SOFTWARE =
  static val Path : string
  nested type AppleInc
  nested type Classes
  nested type Clients
  nested type Dotnet
  nested type Ghisler
  nested type Intel
  nested type Macromedia
  nested type Microsoft
  nested type NuGet
  ...

Full name: FSharp.Management.Registry.HKEY_LOCAL_MACHINE.SOFTWARE


A strongly typed interface to 'HKEY_LOCAL_MACHINE\SOFTWARE'
type Microsoft =
  static val Path : string
  nested type AMSI
  nested type ASP.NET
  nested type ActiveSetup
  nested type AdS
  nested type AdvancedInfSetup
  nested type App
  nested type AspNetDiagnosticPack
  nested type Assistance
  nested type AuthHost
  ...

Full name: FSharp.Management.Registry.HKEY_LOCAL_MACHINE.SOFTWARE.Microsoft


A strongly typed interface to 'HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft'
field Registry.HKEY_LOCAL_MACHINE.SOFTWARE.Microsoft.Path = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft"
Fork me on GitHub