Question: Can anyone tell me please how to extract the data from a .reg file into the registry?

I've tried:

```
 system("regedit /s product.reg");

```

It doesn't work, I have also looked at various other questions on here but have had no joy and I have also trouble understanding them. 

Can anyone shed any light or send me a link that has a good example please?

Thanks

Answer: 
The following things applies to Windows Vista / Windows 7 and later version.

You won't be able to successfully execute regedit.exe unless your application is not running with Administrator privilege.

If you're using Visual Studio 2005/2008/2010, go to the property window of your project, expand the 'Linker' options, and select 'Manifest File'. Change UAC Execution Level to 'requireAministrator'. Save your project and rebuild your project.
According to [this](http://commandwindows.com/reg.htm), the correct command is:

```
reg IMPORT <FileName>

```