Home > Net >  C # the registry operation hints don't allow the requested access to the registry. Problem
C # the registry operation hints don't allow the requested access to the registry. Problem

Time:11-28

A c # project at hand need to registry System \ \ CurrentControlSet \ \ Enum \ \ USBPRINT node, abnormal operation times: don't allow the requested access to the registry, used environment as: VS2015 Win 7 64 - bit System, to solve!

CodePudding user response:

Method 1: program as an administrator to run,
Method 2: in the manifest file specified in the program need administrator privileges
Method 3: using the API improve application level,

CodePudding user response:

CodePudding user response:

Registry operation, the application needs to run as an administrator, or not enough permissions,

CodePudding user response:

Administrator to run, is the most simple right-click your exe files, properties in a "run with administrator privileges", check, to perform automatic get administrator privileges,
This method is actually modify the registry,

The code inside can also improve access,
  • Related