i've got a program i wrote in win xp that changes a registry value

vb.net Code:
  1. Public regShell As RegistryKey
  2. Public regKey As RegistryKey = Registry.LocalMachine
  3.  
  4.  
  5. '' set startup options
  6. If RunToolStripMenuItem.Checked = False Then
  7.    RunToolStripMenuItem.Checked = True
  8.    regShell = regKey.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
  9.    regShell.SetValue("screen capture", Application.ExecutablePath)
  10. Else
  11.    RunToolStripMenuItem.Checked = False
  12.    regShell = regKey.OpenSubKey("Software\Microsoft\Windows\CurrentVersion\Run", True)
  13.    regShell.SetValue("screen capture", "<NonRun>")
  14. End If

this worked well in win xp, but now i've upgraded to vista, it causes an error:

'attempted to perform an unauthorised operation'

how can i rewrite this so it doesn't cause this error?

thanks