[ros-diffs] [cfinck] 33573: Make 1000% sure that any regedit is started by launching regedit from the search path if the GetWindowsDirectory call failed. (suggested by Alex on ros-dev)
cfinck at svn.reactos.org
cfinck at svn.reactos.org
Sun May 18 13:24:56 CEST 2008
Author: cfinck
Date: Sun May 18 06:24:56 2008
New Revision: 33573
URL: http://svn.reactos.org/svn/reactos?rev=33573&view=rev
Log:
Make 1000% sure that any regedit is started by launching regedit from the search path if the GetWindowsDirectory call failed. (suggested by Alex on ros-dev)
Modified:
trunk/reactos/base/applications/regedt32/regedt32.c
Modified: trunk/reactos/base/applications/regedt32/regedt32.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/regedt32/regedt32.c?rev=33573&r1=33572&r2=33573&view=diff
==============================================================================
--- trunk/reactos/base/applications/regedt32/regedt32.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/regedt32/regedt32.c [iso-8859-1] Sun May 18 06:24:56 2008
@@ -2,6 +2,8 @@
#include <tchar.h>
#include <shellapi.h>
#include <shlwapi.h>
+
+#define REGEDIT _T("regedit.exe")
int WINAPI _tWinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst,
LPTSTR lpsCmdLine, int nCmdShow)
@@ -10,8 +12,12 @@
if(GetWindowsDirectory(szPath, MAX_PATH))
{
- PathAppend(szPath, _T("regedit.exe"));
+ PathAppend(szPath, REGEDIT);
ShellExecute(NULL, NULL, szPath, lpsCmdLine, NULL, nCmdShow);
+ }
+ else
+ {
+ ShellExecute(NULL, NULL, REGEDIT, lpsCmdLine, NULL, nCmdShow);
}
return 0;
More information about the Ros-diffs
mailing list