Lars Martin Hambro <lars_martin4 AT hotmail DOT com>
[reactos.git] / reactos / 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 WINAPI _tWinMain(HINSTANCE hCurInst, HINSTANCE hPrevInst,
9 LPTSTR lpsCmdLine, int nCmdShow)
10 {
11 TCHAR szPath[MAX_PATH];
12
13 if(GetWindowsDirectory(szPath, MAX_PATH))
14 {
15 PathAppend(szPath, REGEDIT);
16 ShellExecute(NULL, NULL, szPath, lpsCmdLine, NULL, nCmdShow);
17 }
18 else
19 {
20 ShellExecute(NULL, NULL, REGEDIT, lpsCmdLine, NULL, nCmdShow);
21 }
22
23 return 0;
24 }