mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-29 04:13:32 +00:00
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)
svn path=/trunk/; revision=33573
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
#include <shellapi.h>
|
||||
#include <shlwapi.h>
|
||||
|
||||
#define REGEDIT _T("regedit.exe")
|
||||
|
||||
int WINAPI _tWinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst,
|
||||
LPTSTR lpsCmdLine, int nCmdShow)
|
||||
{
|
||||
@@ -10,9 +12,13 @@ int WINAPI _tWinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst,
|
||||
|
||||
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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user