to write to Registry.LocalMachine in vista or win7 you need admin privileges in your app, which requires vb2008+.

Project-->Properties-->Application-->View UAC Settings + follow the instructions in your app.manifest

to catch the key combination, set your form's keypreview property to true, then handle the keydown event:

vb Code:
  1. Private Sub Form1_KeyDown(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyEventArgs) Handles Me.KeyDown
  2.     Static ALT_F6_Pressed As Boolean = False
  3.     If e.Modifiers = Keys.Alt AndAlso e.KeyValue = Keys.F6 AndAlso ALT_F6_Pressed = False Then
  4.         ALT_F6_Pressed = True
  5.     ElseIf e.Modifiers = Keys.Alt AndAlso e.KeyValue = Keys.F6 AndAlso ALT_F6_Pressed = True Then
  6.         'edit registry
  7.         ALT_F6_Pressed = False
  8.     End If
  9. End Sub