Hello everyone,
I'm having some problems of getting the following simple code to run correctly:
#include <process.h>
int main( void )
{
system("foo.reg"); //why does this NOT WORK?!
//system("reg import foo.reg"); //why does this NOT WORK?!
//system("regedit \"foo.reg\""); //why does this NOT WORK?!
return 0;
}
The registry file is located in the directory where the compiled executable is. foo.reg runs successfully when I run it from command line, but running the above program only shows the regedit confirmation window, and does no corresponding change in the registry itself.
I used Dev-C++ to write the program and I am running Windows XP x64 version SP2. Any help will be greatly appreciated.