String Writer

my tech stuffs…

Update registry files using C#

leave a comment »

When I was doing my IMDB app, I found some of the code snippets are frequently used for desktop applications. Here’s the one code sample.

I was having all my registry settings in .reg file instead of adding each entry through code. All we need to do is run this reg file through code.


string filePath = "IMDBSettings.reg";
.
.
.
Process.Start("regedit.exe", "/s " + filePath).WaitForExit();

About these ads

Written by visvabalaji

September 16, 2011 at 12:04 pm

Posted in C#, SourceCode

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

%d bloggers like this: