2013-01-24 23:00:42 +00:00
|
|
|
#define WIN32_NO_STATUS
|
|
|
|
#define WIN32_LEAN_AND_MEAN
|
2008-05-16 16:53:36 +00:00
|
|
|
#include <windows.h>
|
|
|
|
#include <tchar.h>
|
|
|
|
#include <shellapi.h>
|
2008-05-18 10:56:31 +00:00
|
|
|
#include <shlwapi.h>
|
2008-05-16 16:53:36 +00:00
|
|
|
|
2008-05-18 11:24:56 +00:00
|
|
|
#define REGEDIT _T("regedit.exe")
|
|
|
|
|
2008-10-08 16:26:50 +00:00
|
|
|
int
|
|
|
|
WINAPI
|
|
|
|
_tWinMain(HINSTANCE hCurInst,
|
|
|
|
HINSTANCE hPrevInst,
|
|
|
|
LPTSTR lpsCmdLine,
|
|
|
|
int nCmdShow)
|
2008-05-16 16:53:36 +00:00
|
|
|
{
|
2008-05-17 09:39:36 +00:00
|
|
|
TCHAR szPath[MAX_PATH];
|
|
|
|
|
2008-05-18 10:56:31 +00:00
|
|
|
if(GetWindowsDirectory(szPath, MAX_PATH))
|
|
|
|
{
|
2008-05-18 11:24:56 +00:00
|
|
|
PathAppend(szPath, REGEDIT);
|
2008-10-08 16:26:50 +00:00
|
|
|
ShellExecute(NULL,
|
|
|
|
NULL,
|
|
|
|
szPath,
|
|
|
|
lpsCmdLine,
|
|
|
|
NULL,
|
|
|
|
nCmdShow);
|
2008-05-18 10:56:31 +00:00
|
|
|
}
|
2008-05-18 11:24:56 +00:00
|
|
|
else
|
|
|
|
{
|
2008-10-08 16:26:50 +00:00
|
|
|
ShellExecute(NULL,
|
|
|
|
NULL,
|
|
|
|
REGEDIT,
|
|
|
|
lpsCmdLine,
|
|
|
|
NULL,
|
|
|
|
nCmdShow);
|
2008-05-18 11:24:56 +00:00
|
|
|
}
|
2008-05-16 16:53:36 +00:00
|
|
|
|
|
|
|
return 0;
|
|
|
|
}
|