diff --git a/reactos/base/applications/regedt32/regedt32.c b/reactos/base/applications/regedt32/regedt32.c index 576114a8315..a7355e53100 100644 --- a/reactos/base/applications/regedt32/regedt32.c +++ b/reactos/base/applications/regedt32/regedt32.c @@ -1,16 +1,18 @@ #include #include #include +#include int WINAPI _tWinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst, LPTSTR lpsCmdLine, int nCmdShow) { TCHAR szPath[MAX_PATH]; - GetWindowsDirectory(szPath, MAX_PATH); - _tcscat(szPath, _T("\\regedit.exe")); - - ShellExecute(NULL, NULL, szPath, lpsCmdLine, NULL, nCmdShow); + if(GetWindowsDirectory(szPath, MAX_PATH)) + { + PathAppend(szPath, _T("regedit.exe")); + ShellExecute(NULL, NULL, szPath, lpsCmdLine, NULL, nCmdShow); + } return 0; }