import a reg key using CreateProcess & regedit.exe? -


i need simple way import .reg key registery hive how can this? current code looks this:

#include<windows.h>  int main() {     startupinfo startinfo = { sizeof(startupinfo) };     startinfo.cb = sizeof(startinfo);     startinfo.dwflags = startf_useshowwindow;     startinfo.wshowwindow = sw_hide;     process_information processinfo;     createprocess("regedit.exe /s c:\\folder\\dd.reg", null , null, null, false, create_no_window , null, null, &startinfo, &processinfo); 

from commmand line c:\\windows\regedit.exe /s c:\\folder\\dd.regworks fine, doing wrong?

ps: dont want use system

read documentation createprocess. first parameter name/path of executable; second 1 command line.

createprocess(l"regedit.exe", l"/s whatever.reg", ...)


Comments

Popular posts from this blog

ios - RestKit 0.20 — CoreData: error: Failed to call designated initializer on NSManagedObject class (again) -

java - Digest auth with Spring Security using javaconfig -

laravel - PDOException in Connector.php line 55: SQLSTATE[HY000] [1045] Access denied for user 'root'@'localhost' (using password: YES) -