REGCLEAN

From BR Wiki
Jump to navigation Jump to search

If you are receiving connection errors while working with SQL Mod, and you want to make sure that SQL.EXE was properly registered, you may use regclean.exe to verify the installation of the SQL MOD. You may also use regclean to fix the problems you find, if you find any.

First, make sure the brvb_mgr.keys file can be found in the same folder where brvb_mgr.dll is found. (This should be the same folder where BR was installed.) If you view this text file, you should see a list of all the BR SDK projects you have installed on your computer, along with the associated DCOM key for each one. To use the BR SQL mod, you should see at least two entries: DCOMKEY and SQL. DCOMKEY is necessary to run any BR SDK project, and SQL is the entry associated with the SQL mod.

If you go to a command prompt, and run “regclean -Q all” you should then see a list of these two entries (and any others you may have installed on your computer) along with the path where the executable may be found. Verify that these paths are correct. If the path is present but incorrect (perhaps it points to a different copy or an old version or an old location) then you will need to remove the registry entry. If regclean is unable to locate the file, then skip the next paragraph and proceed to the following paragraph below for instructions on how to add this information back into the registry.

To remove an invalid location from your registry, you need to use regclean.exe again. The command this time is “regclean -d <project>” where <project> is the name of the entry that needs to be removed or all to clear out all of them. In this case, <project> would be “dcomkey”, “sql”, or “all”. After the entries have been removed, you may verify that they are no longer there by running “regclean -q all” again. This time you should see a message indicating that regclean was unable to locate the entries.

Now, all that remains is to add the registry location entries again. To do this, simply run the executable of the project you are trying to add. So, if you need to reregister the dcomkey project, simply type “dcomkey” from the command line. To reregister the SQL project, just type “sql” from the command line. Again, if you choose, you may run “regclean -q all” to verify that the entries have been properly added.

Once they are all present and valid, try running your project again and it should now work fine.

To get command line help for regclean.exe, you may type “regclean -?” from the command prompt.

If you want to simplify the process, you can run the batch file “fix.cmd” which contains the following instructions:

regclean -d all
dcomkey
sql
regclean -q all

This should automatically fix any BR SDK DCOM (311) errors you may encounter.

See also Troubleshooting SQL.