diff --git a/reactos/base/applications/regedt32/regedt32.c b/reactos/base/applications/regedt32/regedt32.c index ba8222a3e73..576114a8315 100644 --- a/reactos/base/applications/regedt32/regedt32.c +++ b/reactos/base/applications/regedt32/regedt32.c @@ -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; }