mirror of
https://github.com/reactos/reactos.git
synced 2024-11-05 14:19:25 +00:00
40 lines
812 B
C
40 lines
812 B
C
#define WIN32_NO_STATUS
|
|
#define WIN32_LEAN_AND_MEAN
|
|
#include <windows.h>
|
|
#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)
|
|
{
|
|
TCHAR szPath[MAX_PATH];
|
|
|
|
if(GetWindowsDirectory(szPath, MAX_PATH))
|
|
{
|
|
PathAppend(szPath, REGEDIT);
|
|
ShellExecute(NULL,
|
|
NULL,
|
|
szPath,
|
|
lpsCmdLine,
|
|
NULL,
|
|
nCmdShow);
|
|
}
|
|
else
|
|
{
|
|
ShellExecute(NULL,
|
|
NULL,
|
|
REGEDIT,
|
|
lpsCmdLine,
|
|
NULL,
|
|
nCmdShow);
|
|
}
|
|
|
|
return 0;
|
|
}
|