CreateProcess(
LPCTSTR lpApplicationName, // name of executable module
LPTSTR lpCommandLine, // command line string
LPSECURITY_ATTRIBUTES lpProcessAttributes, // SD
LPSECURITY_ATTRIBUTES lpThreadAttributes, // SD
BOOL bInheritHandles, // handle inheritance option
DWORD dwCreationFlags, // creation flags
LPVOID lpEnvironment, // new environment block
LPCTSTR lpCurrentDirectory, // current directory name
LPSTARTUPINFO lpStartupInfo, // startup information
LPPROCESS_INFORMATION lpProcessInformation // process information
);
我要把在C:\Program Files\Add.reg导入注册表,
我在第二个参数输入 'regedit.exe C:\Program Files\Add.reg';
由于Program Files之间有一个空格,函数会认为是执行三个命令而达到不我的目的,应该怎么做才可以得到我想要的呢?
LPCTSTR lpApplicationName, // name of executable module
LPTSTR lpCommandLine, // command line string
LPSECURITY_ATTRIBUTES lpProcessAttributes, // SD
LPSECURITY_ATTRIBUTES lpThreadAttributes, // SD
BOOL bInheritHandles, // handle inheritance option
DWORD dwCreationFlags, // creation flags
LPVOID lpEnvironment, // new environment block
LPCTSTR lpCurrentDirectory, // current directory name
LPSTARTUPINFO lpStartupInfo, // startup information
LPPROCESS_INFORMATION lpProcessInformation // process information
);
我要把在C:\Program Files\Add.reg导入注册表,
我在第二个参数输入 'regedit.exe C:\Program Files\Add.reg';
由于Program Files之间有一个空格,函数会认为是执行三个命令而达到不我的目的,应该怎么做才可以得到我想要的呢?
2 简单一点 就是C:\Program Files\Add.reg 加上 “C:\Program Files\Add.reg”
这样你自己就可以解释了