[CLT2012]
[reactos.git] / base / applications / regedt32 / regedt32.c
1 #include <windows.h>
2 #include <tchar.h>
3 #include <shellapi.h>
4 #include <shlwapi.h>
5
6 #define REGEDIT _T("regedit.exe")
7
8 int
9 WINAPI
10 _tWinMain(HINSTANCE hCurInst,
11 HINSTANCE hPrevInst,
12 LPTSTR lpsCmdLine,
13 int nCmdShow)
14 {
15 TCHAR szPath[MAX_PATH];
16
17 if(GetWindowsDirectory(szPath, MAX_PATH))
18 {
19 PathAppend(szPath, REGEDIT);
20 ShellExecute(NULL,
21 NULL,
22 szPath,
23 lpsCmdLine,
24 NULL,
25 nCmdShow);
26 }
27 else
28 {
29 ShellExecute(NULL,
30 NULL,
31 REGEDIT,
32 lpsCmdLine,
33 NULL,
34 nCmdShow);
35 }
36
37 return 0;
38 }