ShellExecuteEx的调用问题
scate 2009-06-15 10:10:04 我要用ShellExecuteEx调用.ent下的regasm来注册一个C#写的com,写了下面这段,但是没有用,执行完后没看到注册表里有加入我那个dll,但是把这段贴到 开始--〉运行 里则可以正常执行,并且也在注册表里加入了新建值
CString strCmd.Format(_T("net.dll /s"));
SHELLEXECUTEINFO ShExecInfo = {0};
ShExecInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShExecInfo.fMask = SEE_MASK_NOCLOSEPROCESS | SEE_MASK_FLAG_NO_UI;
ShExecInfo.hwnd = NULL;
ShExecInfo.lpVerb = NULL;
ShExecInfo.lpFile = _T("%%SystemRoot%%\\Microsoft.NET\\Framework\\v2.0.50727\\regasm.exe");
ShExecInfo.lpParameters = strCmd;
ShExecInfo.lpDirectory = _T("..\\dgm\\");
ShExecInfo.nShow = SW_HIDE;
ShExecInfo.hInstApp = NULL;
ShellExecuteEx(&ShExecInfo);