- Cannot update registry from command line
- Posted by Kevin Brault on January 31st, 2006
Hello everyone,
I have a batch file that executes a C++ executable. Before the executable it
deletes a key from the registry as follows:
echo.Windows Registry Editor Version 5.00>edraw.reg
echo.>>edraw.reg
echo.[-HKEY_CURRENT_USER\\Software\\eDrawings\\PROEOption s]>>edraw.reg
regedit edraw.reg
The C++ executable also deletes the same key by creating and calling a
similar batch file.
The problem I am having is that when the first batch file executes the
regedit command I get an error "Cannot import edraw.reg: Error accessing the
registry.". The C++ app does NOT have this same error. It works fine. I can
also manually merge edraw.reg by double clicking on it without any errors.
What is going on?
Thank you in advance for your help
Kevin J. Brault
- Posted by Stan Brown on February 1st, 2006
Tue, 31 Jan 2006 12:27:53 -0700 from Kevin Brault
<sharptech@cox.net>:
I don't know whether there are other problems, but at the least you
want "echo " and not "echo." on the third line.
Have you tried "type edraw.reg" and compared that to the result of a
registry export to make sure that the file looks right?
--
Stan Brown, Oak Road Systems, Tompkins County, New York, USA
http://OakRoadSystems.com/
- Need help with command-line arguments (Microsoft Windows) by geezer
- Remote Registry from a Command line (Microsoft Windows) by Head Geek
- CPU performance from command line (Microsoft Windows) by FPI
- Change name Via Command Line (Microsoft Windows) by WinterBeast
- Fix Hibernate Command Line (Microsoft Windows) by nemy35

