0

I'm creating a simple timer software for windows 10 desktop, as the app start i want to disable task manager, cmd, and registry..

Currently on disabling task manager using the following code

Dim regkey As Microsoft.Win32.RegistryKey
Dim keyValueInt As String = "1"
Dim subKey As String = "Software\Microsoft\Windows\CurrentVersion\Policies\System"
Try
   regkey = Microsoft.Win32.Registry.CurrentUser.CreateSubKey(subkey:=subKey)
   regkey.SetValue("DisableTaskMgr", keyValueInt)
   regkey.Close()
Catch

End Try 

I'm receiving..

Exception thrown: 'System.UnauthorizedAccessException' in mscorlib.dll

I'm using the Visual Studio 2017 Community in windows 10. Any help will be appreciated.

braX
  • 11,506
  • 5
  • 20
  • 33
johnguild
  • 435
  • 1
  • 5
  • 25

0 Answers0