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 AppXbAckupContentType
  nested type Console
  nested type ControlPanel
  nested type EUDC
  nested type Environment
  nested type KeyboardLayout
  nested type Network
  nested type Printers
  ...

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 BCD00000000
  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 Adobe
  nested type AnkhSvn
  nested type AppleInc
  nested type Atlassian
  nested type Caphyon
  nested type Cisco
  nested type Citrix
  nested type Classes
  nested type Clients
  ...

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 ASP.NET MVC 4
  nested type ActiveSetup
  nested type AdS
  nested type AdvancedInfSetup
  nested type AppEnv
  nested type AspNetCoreLocalFeed
  nested type AspNetWebPages
  ...

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