Click here to Skip to main content
15,885,365 members
Home / Discussions / C#
   

C#

 
AnswerRe: Gracefully exit a .net 8 based windows service Pin
Gerry Schmitz11-Feb-24 9:03
mveGerry Schmitz11-Feb-24 9:03 
AnswerRe: Gracefully exit a .net 8 based windows service [SOLVED] Pin
jschell13-Feb-24 4:50
jschell13-Feb-24 4:50 
QuestionHaving trouble opening a registry key Pin
Richard Andrew x648-Feb-24 14:57
professionalRichard Andrew x648-Feb-24 14:57 
AnswerRe: Having trouble opening a registry key Pin
Dave Kreskowiak8-Feb-24 16:27
mveDave Kreskowiak8-Feb-24 16:27 
AnswerRe: Having trouble opening a registry key Pin
OriginalGriff8-Feb-24 20:02
mveOriginalGriff8-Feb-24 20:02 
GeneralRe: Having trouble opening a registry key Pin
jochance13-Feb-24 9:30
jochance13-Feb-24 9:30 
GeneralRe: Having trouble opening a registry key Pin
OriginalGriff13-Feb-24 19:56
mveOriginalGriff13-Feb-24 19:56 
AnswerRe: Having trouble opening a registry key Pin
Richard Deeming8-Feb-24 22:47
mveRichard Deeming8-Feb-24 22:47 
Richard Andrew x64 wrote:
The registry key already exists when this code runs.
In that case, why are you using CreateSubKey rather than OpenSubKey?

CreateSubKey will attempt to create or open the key for write access. Since you're not writing to it, you should open it for read access instead.

Also note that the RegistryView is only required if your app is compiled as 32-bit and needs to access the 64-bit registry, or vice-versa.

Beyond that, you need to check the ACL on the specific registry key you're trying to open. It's possible that the system account has been denied (or has not been granted) access.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

AnswerRe: Having trouble opening a registry key Pin
Eddy Vluggen12-Feb-24 12:36
professionalEddy Vluggen12-Feb-24 12:36 
RantGlobal using? Pin
jschell8-Feb-24 4:42
jschell8-Feb-24 4:42 
GeneralRe: Global using? Pin
Richard Deeming8-Feb-24 5:19
mveRichard Deeming8-Feb-24 5:19 
GeneralRe: Global using? Pin
jochance13-Feb-24 9:34
jochance13-Feb-24 9:34 
QuestionHow to set up a Using..? Pin
glennPattonWork38-Feb-24 1:32
professionalglennPattonWork38-Feb-24 1:32 
AnswerRe: How to set up a Using..? Pin
Richard Andrew x648-Feb-24 1:38
professionalRichard Andrew x648-Feb-24 1:38 
GeneralRe: How to set up a Using..? Pin
glennPattonWork38-Feb-24 2:24
professionalglennPattonWork38-Feb-24 2:24 
GeneralRe: How to set up a Using..? Pin
Richard Andrew x648-Feb-24 2:33
professionalRichard Andrew x648-Feb-24 2:33 
GeneralRe: How to set up a Using..? Pin
glennPattonWork38-Feb-24 3:11
professionalglennPattonWork38-Feb-24 3:11 
AnswerRe: How to set up a Using..? Pin
Richard Deeming8-Feb-24 2:51
mveRichard Deeming8-Feb-24 2:51 
GeneralRe: How to set up a Using..? Pin
glennPattonWork38-Feb-24 3:10
professionalglennPattonWork38-Feb-24 3:10 
QuestionSystem.ServiceProcess.ServiceController.dll [SOLVED] Pin
Richard Andrew x643-Feb-24 2:38
professionalRichard Andrew x643-Feb-24 2:38 
AnswerRe: System.ServiceProcess.ServiceController.dll [SOLVED] Pin
jochance13-Feb-24 9:37
jochance13-Feb-24 9:37 
GeneralRe: System.ServiceProcess.ServiceController.dll [SOLVED] Pin
Richard Andrew x6413-Feb-24 12:16
professionalRichard Andrew x6413-Feb-24 12:16 
GeneralRe: System.ServiceProcess.ServiceController.dll [SOLVED] Pin
jochance13-Feb-24 12:46
jochance13-Feb-24 12:46 
Questionwhy cant I run powershell script from current directory Pin
Sherzaad132913251-Feb-24 22:04
Sherzaad132913251-Feb-24 22:04 
AnswerRe: why cant I run powershell script from current directory Pin
Richard Deeming1-Feb-24 22:23
mveRichard Deeming1-Feb-24 22:23 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.