Make 100% sure that the correct "regedit.exe" is launched by using GetWindowsDirectory and appending "\regedit.exe" as suggested by Alex on ros-dev.

svn path=/trunk/; revision=33547
This commit is contained in:
Colin Finck 2008-05-17 09:39:36 +00:00
parent 0b51d20053
commit 6209e87ead

View file

@ -5,7 +5,12 @@
int WINAPI _tWinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst,
LPTSTR lpsCmdLine, int nCmdShow)
{
ShellExecute(NULL, NULL, _T("regedit.exe"), lpsCmdLine, NULL, nCmdShow);
TCHAR szPath[MAX_PATH];
GetWindowsDirectory(szPath, MAX_PATH);
_tcscat(szPath, _T("\\regedit.exe"));
ShellExecute(NULL, NULL, szPath, lpsCmdLine, NULL, nCmdShow);
return 0;
}