tags:

views:

1122

answers:

4

I need to problematically change the "Level" String found in \HKEY_CURRENT_USER\Software\Intuit\QBWebConnector to "Verbose"

What is the best way to do this? C#, bat file? I have never tinkered with the registry before...

Thanks.

+1  A: 

You can do this in C# fairly easily. Here is a tutorial on using the Registry/RegistryKey classes in C#.

Reed Copsey
A: 

Actually, the easiest way to change a bunch of registry keys is to use a *.reg file and simply load it into the registry. But be careful: You generally can't send these files to people via e-mail, because they get filtered by many mail servers.

We occasionally use this technique to pass around application configurations and test them on other machines.

I only mention this non-programmatic solution because you suggested that either a C# application or a batch file would be OK, which suggests that you're looking for something lightweight and you aren't too worried about the details.

emk
A: 

From a batch file you may use reg.exe.

Joey
A: 

If the registry entry you are going to change is already in the registry, the simplest way to create a *.reg file that changes the registry entry as you need it is as follows:

  1. Open Regedit
  2. Locate the registry folder right above the registry key you are going to change in the treeview on the left.
  3. Right-click the folder and select "Export".
  4. Open the file you just exported with notepad and delete anything apart from the first line ("Windows Registry Editor Version 5.00" or similar), the folder name ( [HKEY_CURRENT_USER\Software\Intuit\QBWebConnector] in your case) and the name value pair for the key you would like to change
  5. Edit the value you would like to change appropriately and save the file. In your case you should end up with the following *.reg file:

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Intuit\QBWebConnector]

"Level"="Verbose"

Double-clicking the file and confirming the security warning(s) will perform the changes on your registry.

Or, in a batchfile, you can silently import the registry file via "REGEDIT /S pathname"

Be careful with the registry since you might otherwise wreck your windows installation.

Adrian Grigore