Writing to the registry...

A

almurph

Hi everyone


I'm writing to the registry using 2 different techniques:

1. using reg.exe inside a .bat file and
2. Calling System.Diagnostics.EventLog.CreateEventSource() etc...


I'm creating exactly the same entries inside the reg with exactly the
same permissions. There appears to be no difference. Problem is
thought only technique 2 is working.

Does anyone know why? I would appreciate any comments/suggestions/
experiences that you may like to share in this regard. Am I
overlooking anything...

Al.
 
R

Rick Lones

Hi everyone


I'm writing to the registry using 2 different techniques:

1. using reg.exe inside a .bat file and
2. Calling System.Diagnostics.EventLog.CreateEventSource() etc...


I'm creating exactly the same entries inside the reg with exactly the
same permissions. There appears to be no difference. Problem is
thought only technique 2 is working.

You had better define "working", then. If the object is to create a certain set
of registry entries and you have done that both ways, then what is the problem?
Does anyone know why? I would appreciate any comments/suggestions/
experiences that you may like to share in this regard. Am I
overlooking anything...

Um, sure we know. You are doing something wrong in method 1. But fixing your
batch file is not a .Net topic, let alone a C# one. Questions I would ask
though, are: 1) How sure are you that you have found ALL of the registry keys
that CreateEventSource creates or affects? 2) Are you even sure that the
effects of CreateEventSource() are limited to the registry?

HTH,
-rick-
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top