mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 07:26:47 +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:
parent
5bc725550f
commit
5508c5cbb2
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue