Windows Registry key C#

  • Thread starter Giovanni De Angelis
  • Start date
G

Giovanni De Angelis

Hi all,
I am trying to develop a program in C# and I need to change some
registry keys with a dinamic entries. Let's explain better.
I've to change automatically the "Briefcase Path" key of the
partnership created by Microsoft Active Sync but the name is not fixed.
I'd like to find in the registry the key named "Briefcase Path" and
then to change the value with a chosen one.
Usually the key is located in:

\HKEY_CURRENT_USER\Software\Microsoft\Windows CE
Services\Partners\NUMPARTNERSHIP\Service\Synchronisation\BriefCase Path

and NUMPARTNERSHIP is a name dinamically created for each parntnership
by Active Sync. Does anybody knows a way to solve this problem in C#?

Thanks for your advice

Giovanni
 
P

Paul G. Tobey [eMVP]

What's the problem? You can't figure out how to access the registry? You
don't know what the value of that part of the key path is going to be?

A quick look in the .NET framework docs give the information on the Registry
class. The RegistryKey class, which you get from one of the static members
of Registry will tell you how many subkeys there are of, say
\HKEY_CURRENT_USER\Software\Microsoft\Windows CE
Services\Partners\, so you can enumerate what's there and decide what to do.

Paul T.
 

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