From 6209e87ead984b4d827c08fbd69bd989cf1c9c02 Mon Sep 17 00:00:00 2001 From: Colin Finck Date: Sat, 17 May 2008 09:39:36 +0000 Subject: [PATCH] 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 --- reactos/base/applications/regedt32/regedt32.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) 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; }