ReactOS 0.4.17-dev-804-g023d8af
install.c File Reference
#include "precomp.h"
#include <io.h>
#include <wincon.h>
#include <winnls.h>
#include <winsvc.h>
#include <userenv.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <shobjidl.h>
#include <rpcproxy.h>
#include <ndk/cmfuncs.h>
#include <debug.h>
Include dependency graph for install.c:

Go to the source code of this file.

Classes

struct  _DLG_DATA
 

Macros

#define COBJMACROS
 
#define NDEBUG
 

Typedefs

typedef struct _DLG_DATA DLG_DATA
 
typedef struct _DLG_DATAPDLG_DATA
 

Functions

DWORD WINAPI SetupStartService (LPCWSTR lpServiceName, BOOL bWait)
 
static VOID FatalError (char *pszFmt,...)
 
static HRESULT CreateShellLink (LPCWSTR pszLinkPath, LPCWSTR pszCmd, LPCWSTR pszArg, LPCWSTR pszDir, LPCWSTR pszIconPath, INT iIconNr, LPCWSTR pszComment)
 
static BOOL CreateShortcut (LPCWSTR pszFolder, LPCWSTR pszName, LPCWSTR pszCommand, LPCWSTR pszDescription, INT iIconNr, LPCWSTR pszWorkingDir, LPCWSTR pszArgs)
 
static BOOL CreateShortcutsFromSection (_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify, _In_ HINF hinf, _In_ LPWSTR pszSection, _In_ LPCWSTR pszFolder)
 
static BOOL CreateShortcuts (_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify, _In_ HINF hinf, _In_ LPCWSTR szSection)
 
static LONG CountShortcuts (_In_ HINF hinf, _In_ LPCWSTR szSection)
 
VOID InstallStartMenuItems (_In_ PITEMSDATA pItemsData)
 
static VOID CreateTempDir (IN LPCWSTR VarName)
 
static BOOL InstallSysSetupInfDevices (VOID)
 
static BOOL InstallSysSetupInfComponents (VOID)
 
BOOL RegisterTypeLibraries (_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify, _In_ HINF hinf, _In_ LPCWSTR szSection)
 
static BOOL EnableUserModePnpManager (VOID)
 
static VOID AdjustStatusMessageWindow (HWND hwndDlg, PDLG_DATA pDlgData)
 
static INT_PTR CALLBACK StatusMessageWindowProc (IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
 
static DWORD WINAPI ShowStatusMessageThread (IN LPVOID lpParameter)
 
static LONG ReadRegSzKey (IN HKEY hKey, IN LPCWSTR pszKey, OUT LPWSTR *pValue)
 
static BOOL IsConsoleBoot (VOID)
 
static VOID ProcessDetachedProgram (_In_ PCWSTR pszInf)
 
VOID EnableVisualTheme (_In_opt_ HWND hwndParent, _In_opt_ PCWSTR ThemeFile)
 
static VOID PreprocessUnattend (_In_ BOOL IsInstall)
 Pre-process unattended file to apply early settings.
 
static BOOL CommonInstall (VOID)
 
static DWORD InstallLiveCD (VOID)
 
static BOOL SetSetupType (DWORD dwSetupType)
 
static DWORD CALLBACK HotkeyThread (LPVOID Parameter)
 
static BOOL InitializeProgramFilesDir (VOID)
 
static VOID InitializeDefaultUserLocale (VOID)
 
static DWORD SaveDefaultUserHive (VOID)
 
static DWORD InstallReactOS (VOID)
 
INT WINAPI InstallWindowsNt (INT argc, WCHAR **argv)
 
DWORD WINAPI SetupChangeFontSize (IN HANDLE hWnd, IN LPCWSTR lpszFontSize)
 
DWORD WINAPI SetupChangeLocaleEx (HWND hWnd, LCID Lcid, LPCWSTR lpSrcRootPath, char Unknown, DWORD dwUnused1, DWORD dwUnused2)
 
DWORD WINAPI SetupChangeLocale (HWND hWnd, LCID Lcid)
 

Variables

HINF hSysSetupInf = INVALID_HANDLE_VALUE
 
ADMIN_INFO AdminInfo
 

Macro Definition Documentation

◆ COBJMACROS

#define COBJMACROS

Definition at line 14 of file install.c.

◆ NDEBUG

#define NDEBUG

Definition at line 27 of file install.c.

Typedef Documentation

◆ DLG_DATA

◆ PDLG_DATA

Function Documentation

◆ AdjustStatusMessageWindow()

static VOID AdjustStatusMessageWindow ( HWND  hwndDlg,
PDLG_DATA  pDlgData 
)
static

Definition at line 695 of file install.c.

696{
697 INT xOld, yOld, cxOld, cyOld;
698 INT xNew, yNew, cxNew, cyNew;
699 INT cxLabel, cyLabel, dyLabel;
700 RECT rc, rcBar, rcLabel, rcWnd;
701 BITMAP bmLogo, bmBar;
702 DWORD style, exstyle;
703 HWND hwndLogo = GetDlgItem(hwndDlg, IDC_ROSLOGO);
704 HWND hwndBar = GetDlgItem(hwndDlg, IDC_BAR);
705 HWND hwndLabel = GetDlgItem(hwndDlg, IDC_STATUSLABEL);
706
707 /* This adjustment is for CJK only */
709 {
710 case LANG_CHINESE:
711 case LANG_JAPANESE:
712 case LANG_KOREAN:
713 break;
714
715 default:
716 return;
717 }
718
719 if (!GetObjectW(pDlgData->hLogoBitmap, sizeof(BITMAP), &bmLogo) ||
720 !GetObjectW(pDlgData->hBarBitmap, sizeof(BITMAP), &bmBar))
721 {
722 return;
723 }
724
725 GetWindowRect(hwndBar, &rcBar);
726 MapWindowPoints(NULL, hwndDlg, (LPPOINT)&rcBar, 2);
727 dyLabel = bmLogo.bmHeight - rcBar.top;
728
729 GetWindowRect(hwndLabel, &rcLabel);
730 MapWindowPoints(NULL, hwndDlg, (LPPOINT)&rcLabel, 2);
731 cxLabel = rcLabel.right - rcLabel.left;
732 cyLabel = rcLabel.bottom - rcLabel.top;
733
734 MoveWindow(hwndLogo, 0, 0, bmLogo.bmWidth, bmLogo.bmHeight, TRUE);
735 MoveWindow(hwndBar, 0, bmLogo.bmHeight, bmLogo.bmWidth, bmBar.bmHeight, TRUE);
736 MoveWindow(hwndLabel, rcLabel.left, rcLabel.top + dyLabel, cxLabel, cyLabel, TRUE);
737
738 GetWindowRect(hwndDlg, &rcWnd);
739 xOld = rcWnd.left;
740 yOld = rcWnd.top;
741 cxOld = rcWnd.right - rcWnd.left;
742 cyOld = rcWnd.bottom - rcWnd.top;
743
744 GetClientRect(hwndDlg, &rc);
745 SetRect(&rc, 0, 0, bmLogo.bmWidth, rc.bottom - rc.top); /* new client size */
746
748 exstyle = (DWORD)GetWindowLongPtrW(hwndDlg, GWL_EXSTYLE);
749 AdjustWindowRectEx(&rc, style, FALSE, exstyle);
750
751 cxNew = rc.right - rc.left;
752 cyNew = (rc.bottom - rc.top) + dyLabel;
753 xNew = xOld - (cxNew - cxOld) / 2;
754 yNew = yOld - (cyNew - cyOld) / 2;
755 MoveWindow(hwndDlg, xNew, yNew, cxNew, cyNew, TRUE);
756}
Arabic default style
Definition: afstyles.h:94
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
LANGID WINAPI GetUserDefaultLangID(void)
Definition: locale.c:1182
#define IDC_ROSLOGO
Definition: resource.h:69
#define IDC_BAR
Definition: resource.h:70
#define IDC_STATUSLABEL
Definition: resource.h:99
static INT cxOld
Definition: eventvwr.c:4341
static INT cyOld
Definition: eventvwr.c:4341
unsigned long DWORD
Definition: ntddk_ex.h:95
#define DWORD
Definition: nt_native.h:44
#define LANG_CHINESE
Definition: nls.h:42
#define LANG_JAPANESE
Definition: nls.h:76
#define PRIMARYLANGID(l)
Definition: nls.h:16
#define LANG_KOREAN
Definition: nls.h:84
HBITMAP hLogoBitmap
Definition: gui.c:39
HBITMAP hBarBitmap
Definition: gui.c:40
LONG bmHeight
Definition: wingdi.h:1869
LONG bmWidth
Definition: wingdi.h:1868
LONG right
Definition: windef.h:108
LONG bottom
Definition: windef.h:109
LONG top
Definition: windef.h:107
LONG left
Definition: windef.h:106
int32_t INT
Definition: typedefs.h:58
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
#define GetWindowLongPtrW
Definition: winuser.h:4983
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI AdjustWindowRectEx(_Inout_ LPRECT, _In_ DWORD, _In_ BOOL, _In_ DWORD)
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
#define GWL_STYLE
Definition: winuser.h:863
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
BOOL WINAPI SetRect(_Out_ LPRECT, _In_ int, _In_ int, _In_ int, _In_ int)
#define GWL_EXSTYLE
Definition: winuser.h:862

Referenced by StatusMessageWindowProc().

◆ CommonInstall()

static BOOL CommonInstall ( VOID  )
static

Definition at line 1067 of file install.c.

1068{
1070 DWORD dwThreadId = 0;
1071 BOOL bResult = FALSE;
1072
1073 hSysSetupInf = SetupOpenInfFileW(L"syssetup.inf",
1074 NULL,
1076 NULL);
1078 {
1079 FatalError("SetupOpenInfFileW() failed to open 'syssetup.inf' (Error: %lu)\n", GetLastError());
1080 return FALSE;
1081 }
1082
1084 {
1085 FatalError("InstallSysSetupInfDevices() failed!\n");
1086 goto Exit;
1087 }
1088
1090 {
1091 FatalError("InstallSysSetupInfComponents() failed!\n");
1092 goto Exit;
1093 }
1094
1095 if (!IsConsoleBoot())
1096 {
1098 0,
1100 NULL,
1101 0,
1102 &dwThreadId);
1103 }
1104
1106 {
1107 FatalError("EnableUserModePnpManager() failed!\n");
1108 goto Exit;
1109 }
1110
1112 {
1113 FatalError("CMP_WaitNoPendingInstallEvents() failed!\n");
1114 goto Exit;
1115 }
1116
1117 bResult = TRUE;
1118
1119Exit:
1120 if (bResult == FALSE)
1121 {
1123 }
1124
1125 if (hThread != NULL)
1126 {
1130 }
1131
1132 return bResult;
1133}
static BOOL IsConsoleBoot(VOID)
Definition: install.c:471
DWORD WINAPI CMP_WaitNoPendingInstallEvents(_In_ DWORD dwTimeout)
Definition: cfgmgr.c:831
#define CloseHandle
Definition: compat.h:739
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
HANDLE WINAPI DECLSPEC_HOTPATCH CreateThread(IN LPSECURITY_ATTRIBUTES lpThreadAttributes, IN DWORD dwStackSize, IN LPTHREAD_START_ROUTINE lpStartAddress, IN LPVOID lpParameter, IN DWORD dwCreationFlags, OUT LPDWORD lpThreadId)
Definition: thread.c:137
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
Definition: parser.c:1229
static BOOL EnableUserModePnpManager(VOID)
Definition: install.c:611
static BOOL InstallSysSetupInfComponents(VOID)
Definition: install.c:461
static BOOL InstallSysSetupInfDevices(VOID)
Definition: install.c:425
static DWORD WINAPI ShowStatusMessageThread(IN LPVOID lpParameter)
Definition: install.c:879
HINF hSysSetupInf
Definition: install.c:38
static VOID FatalError(char *pszFmt,...)
Definition: install.c:54
#define L(x)
Definition: resources.c:13
#define INFINITE
Definition: serial.h:102
DWORD dwThreadId
Definition: fdebug.c:31
unsigned int BOOL
Definition: ntddk_ex.h:94
#define INF_STYLE_WIN4
Definition: infsupp.h:43
HANDLE hThread
Definition: wizard.c:28
static void Exit(void)
Definition: sock.c:1330
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
Definition: synch.c:82
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
Definition: infsupp.c:45
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
#define WAIT_OBJECT_0
Definition: winbase.h:383
#define WM_QUIT
Definition: winuser.h:1651
#define PostThreadMessage
Definition: winuser.h:5999

Referenced by InstallLiveCD(), and InstallReactOS().

◆ CountShortcuts()

static LONG CountShortcuts ( _In_ HINF  hinf,
_In_ LPCWSTR  szSection 
)
static

Definition at line 288 of file install.c.

291{
293 WCHAR szFolderSection[MAX_PATH];
294 LONG Steps = 0;
295
296 if (!SetupFindFirstLine(hinf, szSection, NULL, &Context))
297 return FALSE;
298
299 do
300 {
301 if (SetupGetFieldCount(&Context) < 2)
302 continue;
303
304 if (!SetupGetStringFieldW(&Context, 0, szFolderSection, ARRAYSIZE(szFolderSection), NULL))
305 continue;
306
307 Steps += SetupGetLineCountW(hinf, szFolderSection);
308 } while (SetupFindNextLine(&Context, &Context));
309
310 return Steps;
311}
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define MAX_PATH
Definition: compat.h:34
LONG WINAPI SetupGetLineCountW(HINF hinf, PCWSTR section)
Definition: parser.c:1501
short WCHAR
Definition: pedump.c:58
long LONG
Definition: pedump.c:60
#define SetupFindFirstLine
Definition: setupapi.h:2673
_In_ PVOID Context
Definition: storport.h:2269
BOOL WINAPI SetupGetStringFieldW(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PWSTR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
Definition: infsupp.c:186
ULONG WINAPI SetupGetFieldCount(IN PINFCONTEXT Context)
Definition: infsupp.c:93
BOOL WINAPI SetupFindNextLine(IN PINFCONTEXT ContextIn, OUT PINFCONTEXT ContextOut)
Definition: infsupp.c:82

Referenced by InstallStartMenuItems().

◆ CreateShellLink()

static HRESULT CreateShellLink ( LPCWSTR  pszLinkPath,
LPCWSTR  pszCmd,
LPCWSTR  pszArg,
LPCWSTR  pszDir,
LPCWSTR  pszIconPath,
INT  iIconNr,
LPCWSTR  pszComment 
)
static

Definition at line 73 of file install.c.

81{
82 IShellLinkW *psl;
83 IPersistFile *ppf;
84
85 HRESULT hr = CoCreateInstance(&CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER, &IID_IShellLink, (LPVOID*)&psl);
86
87 if (SUCCEEDED(hr))
88 {
89 hr = IShellLinkW_SetPath(psl, pszCmd);
90
91 if (pszArg)
92 hr = IShellLinkW_SetArguments(psl, pszArg);
93
94 if (pszDir)
95 hr = IShellLinkW_SetWorkingDirectory(psl, pszDir);
96
97 if (pszIconPath)
98 hr = IShellLinkW_SetIconLocation(psl, pszIconPath, iIconNr);
99
100 if (pszComment)
101 hr = IShellLinkW_SetDescription(psl, pszComment);
102
103 hr = IShellLinkW_QueryInterface(psl, &IID_IPersistFile, (LPVOID*)&ppf);
104
105 if (SUCCEEDED(hr))
106 {
107 hr = IPersistFile_Save(ppf, pszLinkPath, TRUE);
108 IPersistFile_Release(ppf);
109 }
110
111 IShellLinkW_Release(psl);
112 }
113
114 return hr;
115}
HRESULT hr
Definition: delayimp.cpp:582
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, IUnknown *outer, DWORD cls_context, REFIID riid, void **obj)
Definition: combase.c:1685
#define SUCCEEDED(hr)
Definition: intsafe.h:50
const GUID IID_IPersistFile
_In_ LPCSTR pszDir
Definition: shellapi.h:609
#define IID_IShellLink
Definition: shlguid.h:131

Referenced by CreateShortcut().

◆ CreateShortcut()

static BOOL CreateShortcut ( LPCWSTR  pszFolder,
LPCWSTR  pszName,
LPCWSTR  pszCommand,
LPCWSTR  pszDescription,
INT  iIconNr,
LPCWSTR  pszWorkingDir,
LPCWSTR  pszArgs 
)
static

Definition at line 119 of file install.c.

127{
128 DWORD dwLen;
129 LPWSTR Ptr;
132 WCHAR szWorkingDirBuf[MAX_PATH];
133
134 /* If no working directory is provided, try to compute a default one */
135 if (pszWorkingDir == NULL || pszWorkingDir[0] == L'\0')
136 {
137 if (ExpandEnvironmentStringsW(pszCommand, szPath, ARRAYSIZE(szPath)) == 0)
138 wcscpy(szPath, pszCommand);
139
140 dwLen = GetFullPathNameW(szPath,
141 ARRAYSIZE(szWorkingDirBuf),
142 szWorkingDirBuf,
143 &lpFilePart);
144 if (dwLen != 0 && dwLen <= ARRAYSIZE(szWorkingDirBuf))
145 {
146 /* Since those should only be called with (.exe) files,
147 lpFilePart has not to be NULL */
149
150 /* We're only interested in the path. Cut the file name off.
151 Also remove the trailing backslash unless the working directory
152 is only going to be a drive, i.e. C:\ */
153 *(lpFilePart--) = L'\0';
154 if (!(lpFilePart - szWorkingDirBuf == 2 &&
155 szWorkingDirBuf[1] == L':' && szWorkingDirBuf[2] == L'\\'))
156 {
157 *lpFilePart = L'\0';
158 }
159 pszWorkingDir = szWorkingDirBuf;
160 }
161 }
162
163 /* If we failed to compute a working directory, just do not use one */
164 if (pszWorkingDir && pszWorkingDir[0] == L'\0')
165 pszWorkingDir = NULL;
166
167 /* Build the shortcut file name */
168 wcscpy(szPath, pszFolder);
170 wcscpy(Ptr, pszName);
171
172 /* Create the shortcut */
174 pszCommand,
175 pszArgs,
176 pszWorkingDir,
177 /* Special value to indicate no icon */
178 (iIconNr != -1 ? pszCommand : NULL),
179 iIconNr,
180 pszDescription));
181}
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:492
DWORD WINAPI GetFullPathNameW(IN LPCWSTR lpFileName, IN DWORD nBufferLength, OUT LPWSTR lpBuffer, OUT LPWSTR *lpFilePart)
Definition: path.c:1106
static HRESULT CreateShellLink(LPCWSTR pszLinkPath, LPCWSTR pszCmd, LPCWSTR pszArg, LPCWSTR pszDir, LPCWSTR pszIconPath, INT iIconNr, LPCWSTR pszComment)
Definition: install.c:73
_Must_inspect_result_ _In_ PFSRTL_PER_STREAM_CONTEXT Ptr
Definition: fsrtlfuncs.h:898
#define ASSERT(a)
Definition: mode.c:44
LPCWSTR szPath
Definition: env.c:37
#define PathAddBackslash
Definition: pathcch.h:300
wcscpy
uint16_t * LPWSTR
Definition: typedefs.h:56
_In_ LPCSTR _In_opt_ LPCSTR _In_ DWORD _Out_opt_ LPSTR * lpFilePart
Definition: winbase.h:2804

Referenced by CreateShortcutsFromSection().

◆ CreateShortcuts()

static BOOL CreateShortcuts ( _In_ PITEMSDATA  pItemsData,
_In_ PREGISTRATIONNOTIFY  pNotify,
_In_ HINF  hinf,
_In_ LPCWSTR  szSection 
)
static

Definition at line 244 of file install.c.

249{
252 WCHAR szFolder[MAX_PATH];
253 WCHAR szFolderSection[MAX_PATH];
254 INT csidl;
255
257
258 if (!SetupFindFirstLine(hinf, szSection, NULL, &Context))
259 return FALSE;
260
261 do
262 {
263 if (SetupGetFieldCount(&Context) < 2)
264 continue;
265
266 if (!SetupGetStringFieldW(&Context, 0, szFolderSection, ARRAYSIZE(szFolderSection), NULL))
267 continue;
268
269 if (!SetupGetIntField(&Context, 1, &csidl))
270 continue;
271
272 if (!SetupGetStringFieldW(&Context, 2, szFolder, ARRAYSIZE(szFolder), NULL))
273 continue;
274
276 continue;
277
278 CreateShortcutsFromSection(pItemsData, pNotify, hinf, szFolderSection, szPath);
279
280 } while (SetupFindNextLine(&Context, &Context));
281
283
284 return TRUE;
285}
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
Definition: combase.c:2842
HRESULT WINAPI CoInitialize(LPVOID lpReserved)
Definition: compobj.c:531
HRESULT WINAPI SHGetFolderPathAndSubDirW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPCWSTR pszSubPath, LPWSTR pszPath)
Definition: shellpath.c:2782
static BOOL CreateShortcutsFromSection(_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify, _In_ HINF hinf, _In_ LPWSTR pszSection, _In_ LPCWSTR pszFolder)
Definition: install.c:185
#define FAILED(hr)
Definition: intsafe.h:51
@ SHGFP_TYPE_DEFAULT
Definition: shlobj.h:2168
#define CSIDL_FLAG_CREATE
Definition: shlobj.h:2253
BOOL WINAPI SetupGetIntField(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT INT *IntegerValue)
Definition: infsupp.c:148

Referenced by InstallStartMenuItems().

◆ CreateShortcutsFromSection()

static BOOL CreateShortcutsFromSection ( _In_ PITEMSDATA  pItemsData,
_In_ PREGISTRATIONNOTIFY  pNotify,
_In_ HINF  hinf,
_In_ LPWSTR  pszSection,
_In_ LPCWSTR  pszFolder 
)
static

Definition at line 185 of file install.c.

191{
193 DWORD dwFieldCount;
194 INT iIconNr;
195 WCHAR szCommand[MAX_PATH];
198 WCHAR szDirectory[MAX_PATH];
199 WCHAR szArgs[MAX_PATH];
200
201 if (!SetupFindFirstLine(hinf, pszSection, NULL, &Context))
202 return FALSE;
203
204 do
205 {
206 pNotify->Progress++;
207
208 SendMessage(pItemsData->hwndDlg, PM_STEP_START, 0, (LPARAM)pNotify);
209
210 dwFieldCount = SetupGetFieldCount(&Context);
211 if (dwFieldCount < 3)
212 continue;
213
214 if (!SetupGetStringFieldW(&Context, 1, szCommand, ARRAYSIZE(szCommand), NULL))
215 continue;
216
218 continue;
219
221 continue;
222
223 if (dwFieldCount < 4 || !SetupGetIntField(&Context, 4, &iIconNr))
224 iIconNr = -1; /* Special value to indicate no icon */
225
226 if (dwFieldCount < 5 || !SetupGetStringFieldW(&Context, 5, szDirectory, ARRAYSIZE(szDirectory), NULL))
227 szDirectory[0] = L'\0';
228
229 if (dwFieldCount < 6 || !SetupGetStringFieldW(&Context, 6, szArgs, ARRAYSIZE(szArgs), NULL))
230 szArgs[0] = L'\0';
231
232 wcscat(szName, L".lnk");
233
234 CreateShortcut(pszFolder, szName, szCommand, szDescription, iIconNr, szDirectory, szArgs);
235
236 SendMessage(pItemsData->hwndDlg, PM_STEP_END, 0, (LPARAM)pNotify);
237
238 } while (SetupFindNextLine(&Context, &Context));
239
240 return TRUE;
241}
static const WCHAR szDescription[]
Definition: provider.c:55
#define PM_STEP_START
Definition: globals.h:62
#define PM_STEP_END
Definition: globals.h:63
static BOOL CreateShortcut(LPCWSTR pszFolder, LPCWSTR pszName, LPCWSTR pszCommand, LPCWSTR pszDescription, INT iIconNr, LPCWSTR pszWorkingDir, LPCWSTR pszArgs)
Definition: install.c:119
LONG_PTR LPARAM
Definition: minwindef.h:175
static const WCHAR szName[]
Definition: powrprof.c:45
wcscat
#define SendMessage
Definition: winuser.h:6009

Referenced by CreateShortcuts().

◆ CreateTempDir()

static VOID CreateTempDir ( IN LPCWSTR  VarName)
static

Definition at line 372 of file install.c.

374{
375 WCHAR szTempDir[MAX_PATH];
376 WCHAR szBuffer[MAX_PATH];
378 HKEY hKey;
379
381 L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment",
382 0,
384 &hKey) != ERROR_SUCCESS)
385 {
386 FatalError("Error: %lu\n", GetLastError());
387 return;
388 }
389
390 /* Get temp dir */
391 dwLength = sizeof(szBuffer);
393 VarName,
394 NULL,
395 NULL,
396 (LPBYTE)szBuffer,
398 {
399 FatalError("Error: %lu\n", GetLastError());
400 goto cleanup;
401 }
402
403 /* Expand it */
404 if (!ExpandEnvironmentStringsW(szBuffer, szTempDir, ARRAYSIZE(szTempDir)))
405 {
406 FatalError("Error: %lu\n", GetLastError());
407 goto cleanup;
408 }
409
410 /* Create profiles directory */
411 if (!CreateDirectoryW(szTempDir, NULL))
412 {
414 {
415 FatalError("Error: %lu\n", GetLastError());
416 goto cleanup;
417 }
418 }
419
420cleanup:
422}
#define RegCloseKey(hKey)
Definition: registry.h:49
#define ERROR_SUCCESS
Definition: deptool.c:10
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
Definition: reg.c:4103
static DWORD DWORD * dwLength
Definition: fusion.c:86
static void cleanup(void)
Definition: main.c:1335
BOOL WINAPI CreateDirectoryW(IN LPCWSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
Definition: dir.c:58
FxAutoRegKey hKey
#define ERROR_ALREADY_EXISTS
Definition: disk.h:80
#define KEY_QUERY_VALUE
Definition: nt_native.h:1019
unsigned char * LPBYTE
Definition: typedefs.h:53
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12

Referenced by InstallReactOS().

◆ EnableUserModePnpManager()

static BOOL EnableUserModePnpManager ( VOID  )
static

Definition at line 611 of file install.c.

612{
613 SC_HANDLE hSCManager = NULL;
614 SC_HANDLE hService = NULL;
616 BOOL bRet = FALSE;
617 DWORD BytesNeeded, WaitTime;
618
620 if (hSCManager == NULL)
621 {
622 DPRINT1("Unable to open the service control manager.\n");
623 DPRINT1("Last Error %d\n", GetLastError());
624 goto cleanup;
625 }
626
627 hService = OpenServiceW(hSCManager,
628 L"PlugPlay",
630 if (hService == NULL)
631 {
632 DPRINT1("Unable to open PlugPlay service\n");
633 goto cleanup;
634 }
635
636 bRet = ChangeServiceConfigW(hService,
640 NULL, NULL, NULL,
641 NULL, NULL, NULL, NULL);
642 if (!bRet)
643 {
644 DPRINT1("Unable to change the service configuration\n");
645 goto cleanup;
646 }
647
648 bRet = StartServiceW(hService, 0, NULL);
650 {
651 DPRINT1("Unable to start service\n");
652 goto cleanup;
653 }
654
655 while (TRUE)
656 {
657 bRet = QueryServiceStatusEx(hService,
660 sizeof(ServiceStatus),
661 &BytesNeeded);
662 if (!bRet)
663 {
664 DPRINT1("QueryServiceStatusEx() failed for PlugPlay service (error 0x%x)\n", GetLastError());
665 goto cleanup;
666 }
667
669 break;
670
671 WaitTime = ServiceStatus.dwWaitHint / 10;
672 if (WaitTime < 1000) WaitTime = 1000;
673 else if (WaitTime > 10000) WaitTime = 10000;
674 Sleep(WaitTime);
675 };
676
678 {
679 bRet = FALSE;
680 DPRINT1("Failed to start PlugPlay service\n");
681 goto cleanup;
682 }
683
684 bRet = TRUE;
685
686cleanup:
687 if (hService != NULL)
688 CloseServiceHandle(hService);
689 if (hSCManager != NULL)
691 return bRet;
692}
#define DPRINT1
Definition: precomp.h:8
static SERVICE_STATUS ServiceStatus
Definition: browser.c:23
#define SERVICE_START
Definition: winsvc.h:63
#define SERVICE_QUERY_STATUS
Definition: winsvc.h:61
@ SC_STATUS_PROCESS_INFO
Definition: winsvc.h:125
#define SC_MANAGER_ENUMERATE_SERVICE
Definition: winsvc.h:16
#define SERVICE_NO_CHANGE
Definition: winsvc.h:20
#define SERVICE_CHANGE_CONFIG
Definition: winsvc.h:60
#define SERVICE_START_PENDING
Definition: winsvc.h:22
#define SERVICE_RUNNING
Definition: winsvc.h:24
SC_HANDLE hSCManager
Definition: sc.c:12
SC_HANDLE WINAPI OpenSCManagerW(LPCWSTR lpMachineName, LPCWSTR lpDatabaseName, DWORD dwDesiredAccess)
Definition: scm.c:2107
BOOL WINAPI QueryServiceStatusEx(SC_HANDLE hService, SC_STATUS_TYPE InfoLevel, LPBYTE lpBuffer, DWORD cbBufSize, LPDWORD pcbBytesNeeded)
Definition: scm.c:2926
SC_HANDLE WINAPI OpenServiceW(SC_HANDLE hSCManager, LPCWSTR lpServiceName, DWORD dwDesiredAccess)
Definition: scm.c:2199
BOOL WINAPI ChangeServiceConfigW(SC_HANDLE hService, DWORD dwServiceType, DWORD dwStartType, DWORD dwErrorControl, LPCWSTR lpBinaryPathName, LPCWSTR lpLoadOrderGroup, LPDWORD lpdwTagId, LPCWSTR lpDependencies, LPCWSTR lpServiceStartName, LPCWSTR lpPassword, LPCWSTR lpDisplayName)
Definition: scm.c:482
BOOL WINAPI StartServiceW(SC_HANDLE hService, DWORD dwNumServiceArgs, LPCWSTR *lpServiceArgVectors)
Definition: scm.c:3019
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
Definition: scm.c:580
DWORD dwWaitHint
Definition: winsvc.h:111
DWORD dwCurrentState
Definition: winsvc.h:106
VOID WINAPI DECLSPEC_HOTPATCH Sleep(IN DWORD dwMilliseconds)
Definition: synch.c:726
#define ERROR_SERVICE_ALREADY_RUNNING
Definition: winerror.h:931
#define SERVICE_AUTO_START
Definition: cmtypes.h:978

Referenced by CommonInstall().

◆ EnableVisualTheme()

VOID EnableVisualTheme ( _In_opt_ HWND  hwndParent,
_In_opt_ PCWSTR  ThemeFile 
)

Definition at line 1474 of file wizard.c.

1477{
1478 enum { THEME_FILE, STYLE_FILE, UNKNOWN } fType;
1479 WCHAR szPath[MAX_PATH]; // Expanded path of the file to use.
1480 WCHAR szStyleFile[MAX_PATH];
1481
1482 fType = THEME_FILE; // Default to Classic theme.
1483 if (ThemeFile)
1484 {
1485 /* Expand the path if possible */
1486 if (ExpandEnvironmentStringsW(ThemeFile, szPath, _countof(szPath)) != 0)
1487 ThemeFile = szPath;
1488
1489 /* Determine the file type from its extension */
1490 fType = UNKNOWN; {
1491 PCWSTR pszExt = wcsrchr(ThemeFile, L'.'); // PathFindExtensionW(ThemeFile);
1492 if (pszExt)
1493 {
1494 if (_wcsicmp(pszExt, L".theme") == 0)
1495 fType = THEME_FILE;
1496 else if (_wcsicmp(pszExt, L".msstyles") == 0)
1497 fType = STYLE_FILE;
1498 } }
1499 if (fType == UNKNOWN)
1500 {
1501 DPRINT1("EnableVisualTheme(): Unknown file '%S'\n", ThemeFile);
1502 return;
1503 }
1504 }
1505
1506 DPRINT1("Applying visual %s '%S'\n",
1507 (fType == THEME_FILE) ? "theme" : "style",
1508 ThemeFile ? ThemeFile : L"(Classic)");
1509
1510//
1511// TODO: Use instead uxtheme!SetSystemVisualStyle() once it is implemented,
1512// https://stackoverflow.com/a/1036903
1513// https://pinvoke.net/default.aspx/uxtheme.SetSystemVisualStyle
1514// or ApplyTheme(NULL, 0, NULL) for restoring the classic theme.
1515//
1516// NOTE: The '/Action:ActivateMSTheme' is ReactOS-specific.
1517//
1518
1519 if (ThemeFile && (fType == THEME_FILE))
1520 {
1521 /* Retrieve the visual style specified in the theme file.
1522 * If none, fall back to the classic theme. */
1523 if (GetPrivateProfileStringW(L"VisualStyles", L"Path", NULL,
1524 szStyleFile, _countof(szStyleFile), ThemeFile) && *szStyleFile)
1525 {
1526 /* Expand the path if possible */
1527 ThemeFile = szStyleFile;
1528 if (ExpandEnvironmentStringsW(ThemeFile, szPath, _countof(szPath)) != 0)
1529 ThemeFile = szPath;
1530 }
1531 else
1532 {
1533 ThemeFile = NULL;
1534 }
1535
1536 DPRINT1("--> Applying visual style '%S'\n",
1537 ThemeFile ? ThemeFile : L"(Classic)");
1538 }
1539
1540 if (ThemeFile)
1541 {
1542 WCHAR wszParams[1024];
1543 // FIXME: L"desk.cpl desk,@Appearance" regression, see commit 50d260a7f0
1544 PCWSTR format = L"desk.cpl,,2 /Action:ActivateMSTheme /file:\"%s\"";
1545
1546 StringCchPrintfW(wszParams, _countof(wszParams), format, ThemeFile);
1548 }
1549 else
1550 {
1551 RunControlPanelApplet(hwndParent, L"desk.cpl,,2 /Action:ActivateMSTheme");
1552 }
1553}
static HWND hwndParent
Definition: cryptui.c:299
#define wcsrchr
Definition: compat.h:16
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
Definition: profile.c:1142
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
Definition: wcs.c:164
void * UNKNOWN
Definition: ks.h:2676
#define _countof(array)
Definition: sndvol32.h:70
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
Definition: strsafe.h:530
Definition: format.c:58
static BOOL RunControlPanelApplet(HWND hwnd, PCWSTR pwszCPLParameters)
Definition: wizard.c:1412
const uint16_t * PCWSTR
Definition: typedefs.h:57
struct _THEME_FILE THEME_FILE

Referenced by PreprocessUnattend(), and ThemePageDlgProc().

◆ FatalError()

static VOID FatalError ( char pszFmt,
  ... 
)
static

Definition at line 54 of file install.c.

55{
56 char szBuffer[512];
57 va_list ap;
58
59 va_start(ap, pszFmt);
60 vsprintf(szBuffer, pszFmt, ap);
61 va_end(ap);
62
63 LogItem(NULL, L"Failed");
64
65 strcat(szBuffer, "\nRebooting now!");
67 szBuffer,
68 "ReactOS Setup",
69 MB_OK);
70}
#define va_end(v)
Definition: stdarg.h:28
#define va_start(v, l)
Definition: stdarg.h:26
_ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl _ACRTIMP int __cdecl vsprintf(char *, const char *, va_list) __WINE_CRT_PRINTF_ATTR(2
char * va_list
Definition: vadefs.h:50
strcat
Definition: string.h:92
#define LogItem(lpTag, lpMessageText...)
Definition: syssetup.h:102
void int int ULONGLONG int va_list * ap
Definition: winesup.h:36
int WINAPI MessageBoxA(_In_opt_ HWND hWnd, _In_opt_ LPCSTR lpText, _In_opt_ LPCSTR lpCaption, _In_ UINT uType)
#define MB_OK
Definition: winuser.h:801

Referenced by CommonInstall(), CreateTempDir(), InstallReactOS(), InstallSysSetupInfComponents(), and RegisterTypeLibraries().

◆ HotkeyThread()

static DWORD CALLBACK HotkeyThread ( LPVOID  Parameter)
static

Definition at line 1247 of file install.c.

1248{
1249 ATOM hotkey;
1250 MSG msg;
1251
1252 DPRINT("HotkeyThread start\n");
1253
1254 hotkey = GlobalAddAtomW(L"Setup Shift+F10 Hotkey");
1255 if (!RegisterHotKey(NULL, hotkey, MOD_SHIFT, VK_F10))
1256 DPRINT1("RegisterHotKey failed with %lu\n", GetLastError());
1257
1258 while (GetMessageW(&msg, NULL, 0, 0))
1259 {
1260 if (msg.hwnd == NULL && msg.message == WM_HOTKEY && msg.wParam == hotkey)
1261 {
1262 WCHAR CmdLine[] = L"cmd.exe"; // CreateProcess can modify this buffer.
1263 STARTUPINFOW si = { sizeof(si) };
1265
1266 if (CreateProcessW(NULL,
1267 CmdLine,
1268 NULL,
1269 NULL,
1270 FALSE,
1272 NULL,
1273 NULL,
1274 &si,
1275 &pi))
1276 {
1279 }
1280 else
1281 {
1282 DPRINT1("Failed to launch command prompt: %lu\n", GetLastError());
1283 }
1284 }
1285 }
1286
1287 UnregisterHotKey(NULL, hotkey);
1288 GlobalDeleteAtom(hotkey);
1289
1290 DPRINT("HotkeyThread terminate\n");
1291 return 0;
1292}
#define msg(x)
Definition: auth_time.c:54
WORD ATOM
Definition: dimm.idl:113
ATOM WINAPI GlobalDeleteAtom(ATOM nAtom)
Definition: atom.c:444
ATOM WINAPI GlobalAddAtomW(LPCWSTR lpString)
Definition: atom.c:434
BOOL WINAPI DECLSPEC_HOTPATCH CreateProcessW(LPCWSTR lpApplicationName, LPWSTR lpCommandLine, LPSECURITY_ATTRIBUTES lpProcessAttributes, LPSECURITY_ATTRIBUTES lpThreadAttributes, BOOL bInheritHandles, DWORD dwCreationFlags, LPVOID lpEnvironment, LPCWSTR lpCurrentDirectory, LPSTARTUPINFOW lpStartupInfo, LPPROCESS_INFORMATION lpProcessInformation)
Definition: proc.c:4491
static const WCHAR CmdLine[]
Definition: install.c:48
#define MOD_SHIFT
Definition: imm.h:186
static PROCESS_INFORMATION pi
Definition: debugger.c:2303
static SYSTEM_INFO si
Definition: virtual.c:39
#define DPRINT
Definition: sndvol32.h:73
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
#define CREATE_NEW_CONSOLE
Definition: winbase.h:185
#define VK_F10
Definition: winuser.h:2300
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL WINAPI UnregisterHotKey(_In_opt_ HWND, _In_ int)
BOOL WINAPI RegisterHotKey(_In_opt_ HWND, _In_ int, _In_ UINT, _In_ UINT)
#define WM_HOTKEY
Definition: winuser.h:1907

Referenced by InstallReactOS().

◆ InitializeDefaultUserLocale()

static VOID InitializeDefaultUserLocale ( VOID  )
static

Definition at line 1412 of file install.c.

1413{
1414 WCHAR szBuffer[80];
1415 PWSTR ptr;
1416 HKEY hLocaleKey;
1417 DWORD ret;
1418 DWORD dwSize;
1419 LCID lcid;
1420 INT i;
1421
1422 struct {LCTYPE LCType; PWSTR pValue;} LocaleData[] = {
1423 /* Number */
1424 {LOCALE_SDECIMAL, L"sDecimal"},
1425 {LOCALE_STHOUSAND, L"sThousand"},
1426 {LOCALE_SNEGATIVESIGN, L"sNegativeSign"},
1427 {LOCALE_SPOSITIVESIGN, L"sPositiveSign"},
1428 {LOCALE_SGROUPING, L"sGrouping"},
1429 {LOCALE_SLIST, L"sList"},
1430 {LOCALE_SNATIVEDIGITS, L"sNativeDigits"},
1431 {LOCALE_INEGNUMBER, L"iNegNumber"},
1432 {LOCALE_IDIGITS, L"iDigits"},
1433 {LOCALE_ILZERO, L"iLZero"},
1434 {LOCALE_IMEASURE, L"iMeasure"},
1435 {LOCALE_IDIGITSUBSTITUTION, L"NumShape"},
1436
1437 /* Currency */
1438 {LOCALE_SCURRENCY, L"sCurrency"},
1439 {LOCALE_SMONDECIMALSEP, L"sMonDecimalSep"},
1440 {LOCALE_SMONTHOUSANDSEP, L"sMonThousandSep"},
1441 {LOCALE_SMONGROUPING, L"sMonGrouping"},
1442 {LOCALE_ICURRENCY, L"iCurrency"},
1443 {LOCALE_INEGCURR, L"iNegCurr"},
1444 {LOCALE_ICURRDIGITS, L"iCurrDigits"},
1445
1446 /* Time */
1447 {LOCALE_STIMEFORMAT, L"sTimeFormat"},
1448 {LOCALE_STIME, L"sTime"},
1449 {LOCALE_S1159, L"s1159"},
1450 {LOCALE_S2359, L"s2359"},
1451 {LOCALE_ITIME, L"iTime"},
1452 {LOCALE_ITIMEMARKPOSN, L"iTimePrefix"},
1453 {LOCALE_ITLZERO, L"iTLZero"},
1454
1455 /* Date */
1456 {LOCALE_SLONGDATE, L"sLongDate"},
1457 {LOCALE_SSHORTDATE, L"sShortDate"},
1458 {LOCALE_SDATE, L"sDate"},
1459 {LOCALE_IFIRSTDAYOFWEEK, L"iFirstDayOfWeek"},
1460 {LOCALE_IFIRSTWEEKOFYEAR, L"iFirstWeekOfYear"},
1461 {LOCALE_IDATE, L"iDate"},
1462 {LOCALE_ICALENDARTYPE, L"iCalendarType"},
1463
1464 /* Misc */
1465 {LOCALE_SCOUNTRY, L"sCountry"},
1466 {LOCALE_SABBREVLANGNAME, L"sLanguage"},
1467 {LOCALE_ICOUNTRY, L"iCountry"},
1468 {0, NULL}};
1469
1471 L".DEFAULT\\Control Panel\\International",
1472 0,
1474 &hLocaleKey);
1475 if (ret != ERROR_SUCCESS)
1476 {
1477 return;
1478 }
1479
1480 dwSize = 9 * sizeof(WCHAR);
1481 ret = RegQueryValueExW(hLocaleKey,
1482 L"Locale",
1483 NULL,
1484 NULL,
1485 (PBYTE)szBuffer,
1486 &dwSize);
1487 if (ret != ERROR_SUCCESS)
1488 goto done;
1489
1490 lcid = (LCID)wcstoul(szBuffer, &ptr, 16);
1491 if (lcid == 0)
1492 goto done;
1493
1494 i = 0;
1495 while (LocaleData[i].pValue != NULL)
1496 {
1497 if (GetLocaleInfoW(lcid,
1498 LocaleData[i].LCType | LOCALE_NOUSEROVERRIDE,
1499 szBuffer,
1500 ARRAYSIZE(szBuffer)))
1501 {
1502 RegSetValueExW(hLocaleKey,
1503 LocaleData[i].pValue,
1504 0,
1505 REG_SZ,
1506 (PBYTE)szBuffer,
1507 (wcslen(szBuffer) + 1) * sizeof(WCHAR));
1508 }
1509
1510 i++;
1511 }
1512
1513done:
1514 RegCloseKey(hLocaleKey);
1515}
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
Definition: reg.c:4882
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: locale.c:1675
LCID lcid
Definition: locale.c:5660
_ACRTIMP __msvcrt_ulong __cdecl wcstoul(const wchar_t *, wchar_t **, int)
Definition: wcs.c:2917
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
Definition: wcs.c:2988
return ret
Definition: mutex.c:147
PWCHAR pValue
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define REG_SZ
Definition: layer.c:22
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
static PVOID ptr
Definition: dispmode.c:27
#define KEY_READ
Definition: nt_native.h:1026
#define KEY_WRITE
Definition: nt_native.h:1034
BYTE * PBYTE
Definition: pedump.c:66
DWORD LCID
Definition: nls.h:13
uint16_t * PWSTR
Definition: typedefs.h:56
#define LOCALE_ICURRDIGITS
Definition: winnls.h:64
#define LOCALE_SCOUNTRY
Definition: winnls.h:40
#define LOCALE_SDATE
Definition: winnls.h:68
#define LOCALE_SGROUPING
Definition: winnls.h:54
#define LOCALE_ICOUNTRY
Definition: winnls.h:39
#define LOCALE_SDECIMAL
Definition: winnls.h:52
#define LOCALE_IDATE
Definition: winnls.h:73
#define LOCALE_IFIRSTWEEKOFYEAR
Definition: winnls.h:86
#define LOCALE_IMEASURE
Definition: winnls.h:51
#define LOCALE_SLONGDATE
Definition: winnls.h:71
#define LOCALE_S1159
Definition: winnls.h:81
#define LOCALE_SSHORTDATE
Definition: winnls.h:70
#define LOCALE_SPOSITIVESIGN
Definition: winnls.h:127
#define LOCALE_SMONDECIMALSEP
Definition: winnls.h:61
#define LOCALE_ITIME
Definition: winnls.h:75
#define LOCALE_ICURRENCY
Definition: winnls.h:66
#define LOCALE_ITLZERO
Definition: winnls.h:78
#define LOCALE_SMONTHOUSANDSEP
Definition: winnls.h:62
#define LOCALE_NOUSEROVERRIDE
Definition: winnls.h:19
#define LOCALE_IDIGITS
Definition: winnls.h:55
#define LOCALE_STHOUSAND
Definition: winnls.h:53
#define LOCALE_STIMEFORMAT
Definition: winnls.h:72
#define LOCALE_IFIRSTDAYOFWEEK
Definition: winnls.h:85
#define LOCALE_STIME
Definition: winnls.h:69
#define LOCALE_SABBREVLANGNAME
Definition: winnls.h:37
#define LOCALE_INEGNUMBER
Definition: winnls.h:57
#define LOCALE_SNEGATIVESIGN
Definition: winnls.h:128
DWORD LCTYPE
Definition: winnls.h:592
#define LOCALE_S2359
Definition: winnls.h:82
#define LOCALE_SNATIVEDIGITS
Definition: winnls.h:58
#define LOCALE_SLIST
Definition: winnls.h:50
#define LOCALE_ILZERO
Definition: winnls.h:56
#define LOCALE_ICALENDARTYPE
Definition: winnls.h:83
#define LOCALE_SMONGROUPING
Definition: winnls.h:63
#define LOCALE_SCURRENCY
Definition: winnls.h:59
#define LOCALE_INEGCURR
Definition: winnls.h:67
#define LOCALE_ITIMEMARKPOSN
Definition: winnls.h:76
#define HKEY_USERS
Definition: winreg.h:13

Referenced by InstallReactOS().

◆ InitializeProgramFilesDir()

static BOOL InitializeProgramFilesDir ( VOID  )
static

Definition at line 1297 of file install.c.

1298{
1299 LONG Error;
1300 HKEY hKey;
1302 WCHAR szProgramFilesDirPath[MAX_PATH];
1303 WCHAR szCommonFilesDirPath[MAX_PATH];
1304 WCHAR szBuffer[MAX_PATH];
1305
1306 /* Load 'Program Files' location */
1309 szBuffer,
1310 ARRAYSIZE(szBuffer)))
1311 {
1312 DPRINT1("Error: %lu\n", GetLastError());
1313 return FALSE;
1314 }
1315
1318 szCommonFilesDirPath,
1319 ARRAYSIZE(szCommonFilesDirPath)))
1320 {
1321 DPRINT1("Warning: %lu\n", GetLastError());
1322 }
1323
1324 /* Expand it */
1325 if (!ExpandEnvironmentStringsW(szBuffer,
1326 szProgramFilesDirPath,
1327 ARRAYSIZE(szProgramFilesDirPath)))
1328 {
1329 DPRINT1("Error: %lu\n", GetLastError());
1330 return FALSE;
1331 }
1332
1333 wcscpy(szBuffer, szProgramFilesDirPath);
1334 wcscat(szBuffer, L"\\");
1335 wcscat(szBuffer, szCommonFilesDirPath);
1336
1337 if (!ExpandEnvironmentStringsW(szBuffer,
1338 szCommonFilesDirPath,
1339 ARRAYSIZE(szCommonFilesDirPath)))
1340 {
1341 DPRINT1("Warning: %lu\n", GetLastError());
1342 }
1343
1344 /* Store it */
1346 L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion",
1347 0,
1349 &hKey);
1350 if (Error != ERROR_SUCCESS)
1351 {
1352 DPRINT1("Error: %lu\n", Error);
1353 return FALSE;
1354 }
1355
1356 dwLength = (wcslen(szProgramFilesDirPath) + 1) * sizeof(WCHAR);
1358 L"ProgramFilesDir",
1359 0,
1360 REG_SZ,
1361 (LPBYTE)szProgramFilesDirPath,
1362 dwLength);
1363 if (Error != ERROR_SUCCESS)
1364 {
1365 DPRINT1("Error: %lu\n", Error);
1367 return FALSE;
1368 }
1369
1370 dwLength = (wcslen(szCommonFilesDirPath) + 1) * sizeof(WCHAR);
1372 L"CommonFilesDir",
1373 0,
1374 REG_SZ,
1375 (LPBYTE)szCommonFilesDirPath,
1376 dwLength);
1377 if (Error != ERROR_SUCCESS)
1378 {
1379 DPRINT1("Warning: %lu\n", Error);
1380 }
1381
1383
1384 /* Create directory */
1385 // FIXME: Security!
1386 if (!CreateDirectoryW(szProgramFilesDirPath, NULL))
1387 {
1389 {
1390 DPRINT1("Error: %lu\n", GetLastError());
1391 return FALSE;
1392 }
1393 }
1394
1395 /* Create directory */
1396 // FIXME: Security!
1397 if (!CreateDirectoryW(szCommonFilesDirPath, NULL))
1398 {
1400 {
1401 DPRINT1("Warning: %lu\n", GetLastError());
1402 // return FALSE;
1403 }
1404 }
1405
1406 return TRUE;
1407}
BOOL Error
Definition: chkdsk.c:66
static HINSTANCE hDllInstance
Definition: clb.c:9
#define IDS_PROGRAMFILES
Definition: resource.h:164
#define IDS_COMMONFILES
Definition: resource.h:165
#define KEY_SET_VALUE
Definition: nt_native.h:1020
#define LoadStringW
Definition: utils.h:64

Referenced by InstallReactOS().

◆ InstallLiveCD()

static DWORD InstallLiveCD ( VOID  )
static

Definition at line 1137 of file install.c.

1138{
1139 STARTUPINFOW StartupInfo;
1140 PROCESS_INFORMATION ProcessInformation;
1141 BOOL bRes;
1142
1144 if (!CommonInstall())
1145 goto error;
1146
1147 /* Install the TCP/IP protocol driver */
1148 bRes = InstallNetworkComponent(L"MS_TCPIP");
1149 if (!bRes && GetLastError() != ERROR_FILE_NOT_FOUND)
1150 {
1151 DPRINT("InstallNetworkComponent() failed with error 0x%lx\n", GetLastError());
1152 }
1153 else
1154 {
1155 /* Start the TCP/IP protocol driver */
1156 SetupStartService(L"Tcpip", FALSE);
1157 SetupStartService(L"Dhcp", FALSE);
1158 SetupStartService(L"Dnscache", FALSE);
1159 }
1160
1161 /* Register components */
1162 _SEH2_TRY
1163 {
1165 hSysSetupInf, L"RegistrationPhase2",
1166 SPINST_ALL,
1167 0, NULL, 0, NULL, NULL, NULL, NULL))
1168 {
1169 DPRINT1("SetupInstallFromInfSectionW failed!\n");
1170 }
1171
1172 RegisterTypeLibraries(NULL, NULL, hSysSetupInf, L"TypeLibraries");
1173 }
1175 {
1176 DPRINT1("Catching exception\n");
1177 }
1178 _SEH2_END;
1179
1181
1182 /* Run the shell */
1183 ZeroMemory(&StartupInfo, sizeof(StartupInfo));
1184 StartupInfo.cb = sizeof(StartupInfo);
1185 bRes = CreateProcessW(L"userinit.exe",
1186 NULL,
1187 NULL,
1188 NULL,
1189 FALSE,
1190 0,
1191 NULL,
1192 NULL,
1193 &StartupInfo,
1194 &ProcessInformation);
1195 if (!bRes)
1196 goto error;
1197
1198 CloseHandle(ProcessInformation.hThread);
1199 CloseHandle(ProcessInformation.hProcess);
1200
1201 return 0;
1202
1203error:
1205 L"Failed to load LiveCD! You can shutdown your computer, or press ENTER to reboot.",
1206 L"ReactOS LiveCD",
1207 MB_OK);
1208 // HACK: This shouldn't be done here, but by the caller of InstallWindowsNt()
1209 /* Enable the shutdown privilege and reboot the machine */
1211 DPRINT1("pSetupEnablePrivilege(SE_SHUTDOWN_NAME) failed (Error %lu)\n", GetLastError());
1213 return 0;
1214}
BOOL WINAPI SetupInstallFromInfSectionW(HWND owner, HINF hinf, PCWSTR section, UINT flags, HKEY key_root, PCWSTR src_root, UINT copy_flags, PSP_FILE_CALLBACK_W callback, PVOID context, HDEVINFO devinfo, PSP_DEVINFO_DATA devinfo_data)
Definition: install.c:1330
BOOL WINAPI pSetupEnablePrivilege(LPCWSTR lpPrivilegeName, BOOL bEnable)
Definition: misc.c:440
static BOOL CommonInstall(VOID)
Definition: install.c:1067
static VOID PreprocessUnattend(_In_ BOOL IsInstall)
Pre-process unattended file to apply early settings.
Definition: install.c:1023
DWORD WINAPI SetupStartService(LPCWSTR lpServiceName, BOOL bWait)
Definition: install.c:1789
BOOL RegisterTypeLibraries(_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify, _In_ HINF hinf, _In_ LPCWSTR szSection)
Definition: install.c:540
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define ZeroMemory
Definition: minwinbase.h:31
#define error(str)
Definition: mkdosfs.c:1605
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:104
#define _SEH2_END
Definition: pseh2_64.h:194
#define _SEH2_TRY
Definition: pseh2_64.h:93
static HRESULT InstallNetworkComponent(LPWSTR pszComponentName, const GUID *pClassGuid)
Definition: setup.cpp:54
#define SPINST_ALL
Definition: setupapi.h:604
#define SE_SHUTDOWN_NAME
Definition: winnt_old.h:427
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define EWX_REBOOT
Definition: winuser.h:646
BOOL WINAPI ExitWindowsEx(_In_ UINT, _In_ DWORD)

Referenced by InstallWindowsNt().

◆ InstallReactOS()

static DWORD InstallReactOS ( VOID  )
static

Definition at line 1594 of file install.c.

1595{
1596 BOOL ret;
1597 DWORD dwHotkeyThreadId = 0;
1598 WCHAR szBuffer[MAX_PATH];
1599
1601 LogItem(NULL, L"Installing ReactOS");
1602
1603 CreateTempDir(L"TEMP");
1604 CreateTempDir(L"TMP");
1605
1607 {
1608 FatalError("InitializeProgramFilesDir() failed");
1609 goto Quit;
1610 }
1611
1612 if (!InitializeProfiles())
1613 {
1614 FatalError("InitializeProfiles() failed");
1615 goto Quit;
1616 }
1617
1619
1620 if (GetWindowsDirectoryW(szBuffer, ARRAYSIZE(szBuffer)))
1621 {
1622 HKEY hKey;
1624 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion",
1625 0,
1626 KEY_WRITE,
1627 &hKey) == ERROR_SUCCESS)
1628 {
1630 L"PathName",
1631 0,
1632 REG_SZ,
1633 (LPBYTE)szBuffer,
1634 (wcslen(szBuffer) + 1) * sizeof(WCHAR));
1635
1637 L"SystemRoot",
1638 0,
1639 REG_SZ,
1640 (LPBYTE)szBuffer,
1641 (wcslen(szBuffer) + 1) * sizeof(WCHAR));
1642
1644 }
1645
1646 PathAddBackslash(szBuffer);
1647 wcscat(szBuffer, L"system");
1648 CreateDirectory(szBuffer, NULL);
1649 }
1650
1652 {
1653 FatalError("SaveDefaultUserHive() failed");
1654 goto Quit;
1655 }
1656
1657 if (!CopySystemProfile(0))
1658 {
1659 FatalError("CopySystemProfile() failed");
1660 goto Quit;
1661 }
1662
1663 /* Start the hotkey thread */
1664 CloseHandle(CreateThread(NULL, 0, HotkeyThread, NULL, 0, &dwHotkeyThreadId));
1665
1667 if (!CommonInstall())
1668 goto Quit;
1669
1670 /* Install the TCP/IP protocol driver */
1671 ret = InstallNetworkComponent(L"MS_TCPIP");
1673 {
1674 DPRINT("InstallNetworkComponent() failed with error 0x%lx\n", GetLastError());
1675 }
1676 else
1677 {
1678 /* Start the TCP/IP protocol driver */
1679 SetupStartService(L"Tcpip", FALSE);
1680 SetupStartService(L"Dhcp", FALSE);
1681 SetupStartService(L"Dnscache", FALSE);
1682 }
1683
1684 InstallWizard();
1685
1687
1689 SetSetupType(0);
1690
1691 /* Stop the hotkey thread */
1692 if (dwHotkeyThreadId)
1693 PostThreadMessage(dwHotkeyThreadId, WM_QUIT, 0, 0);
1694
1695 LogItem(NULL, L"Installing ReactOS done");
1697
1698 if (AdminInfo.Name != NULL)
1699 RtlFreeHeap(RtlGetProcessHeap(), 0, AdminInfo.Name);
1700
1701 if (AdminInfo.Domain != NULL)
1702 RtlFreeHeap(RtlGetProcessHeap(), 0, AdminInfo.Domain);
1703
1704 if (AdminInfo.Password != NULL)
1705 RtlFreeHeap(RtlGetProcessHeap(), 0, AdminInfo.Password);
1706
1707Quit:
1708 // HACK: This shouldn't be done here, but by the caller of InstallWindowsNt()
1709 /* Enable the shutdown privilege and reboot the machine */
1711 DPRINT1("pSetupEnablePrivilege(SE_SHUTDOWN_NAME) failed (Error %lu)\n", GetLastError());
1713 return 0;
1714}
BOOLEAN NTAPI RtlFreeHeap(IN PVOID HeapHandle, IN ULONG Flags, IN PVOID HeapBase)
Definition: heap.c:634
UINT WINAPI GetWindowsDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2271
VOID SetAutoAdminLogon(VOID)
Definition: security.c:1831
VOID InstallWizard(VOID)
Definition: wizard.c:3487
static VOID InitializeDefaultUserLocale(VOID)
Definition: install.c:1412
static DWORD SaveDefaultUserHive(VOID)
Definition: install.c:1520
ADMIN_INFO AdminInfo
Definition: install.c:39
static VOID CreateTempDir(IN LPCWSTR VarName)
Definition: install.c:372
static BOOL SetSetupType(DWORD dwSetupType)
Definition: install.c:1218
static BOOL InitializeProgramFilesDir(VOID)
Definition: install.c:1297
static DWORD CALLBACK HotkeyThread(LPVOID Parameter)
Definition: install.c:1247
BOOL WINAPI CopySystemProfile(_In_ ULONG Unused)
Definition: profile.c:565
BOOL WINAPI InitializeProfiles(VOID)
Definition: setup.c:335
BOOL WINAPI InitializeSetupActionLog(BOOL bDeleteOldLogFile)
Definition: logfile.c:42
VOID WINAPI TerminateSetupActionLog(VOID)
Definition: logfile.c:82
LPWSTR Password
Definition: globals.h:25
LPWSTR Name
Definition: globals.h:23
LPWSTR Domain
Definition: globals.h:24
#define CreateDirectory
Definition: winbase.h:3467

Referenced by InstallWindowsNt(), and RunInstallReactOS().

◆ InstallStartMenuItems()

VOID InstallStartMenuItems ( _In_ PITEMSDATA  pItemsData)

Definition at line 314 of file install.c.

316{
317 HINF hShortcutsInf1 = INVALID_HANDLE_VALUE;
318 HINF hShortcutsInf2 = INVALID_HANDLE_VALUE;
319 LONG Steps = 0;
320 DWORD LastError = 0;
322
323 ZeroMemory(&Notify, sizeof(Notify));
324
325 hShortcutsInf1 = SetupOpenInfFileW(L"shortcuts.inf",
326 NULL,
328 NULL);
329 if (hShortcutsInf1 == INVALID_HANDLE_VALUE)
330 {
331 DPRINT1("Failed to open shortcuts.inf");
332 return;
333 }
334
335 hShortcutsInf2 = SetupOpenInfFileW(L"rosapps_shortcuts.inf",
336 NULL,
338 NULL);
339
340 Steps = CountShortcuts(hShortcutsInf1, L"ShortcutFolders");
341 if (hShortcutsInf2 != INVALID_HANDLE_VALUE)
342 Steps += CountShortcuts(hShortcutsInf2, L"ShortcutFolders");
343
344 SendMessage(pItemsData->hwndDlg, PM_ITEM_START, 1, (LPARAM)Steps);
345
346 if (!CreateShortcuts(pItemsData, &Notify, hShortcutsInf1, L"ShortcutFolders"))
347 {
348 DPRINT1("CreateShortcuts() failed");
349 goto done;
350 }
351
352 if (hShortcutsInf2 != INVALID_HANDLE_VALUE)
353 {
354 if (!CreateShortcuts(pItemsData, &Notify, hShortcutsInf2, L"ShortcutFolders"))
355 {
356 DPRINT1("CreateShortcuts(rosapps) failed");
357 goto done;
358 }
359 }
360
361done:
362 if (hShortcutsInf2 != INVALID_HANDLE_VALUE)
363 SetupCloseInfFile(hShortcutsInf2);
364
365 if (hShortcutsInf1 != INVALID_HANDLE_VALUE)
366 SetupCloseInfFile(hShortcutsInf1);
367
368 SendMessage(pItemsData->hwndDlg, PM_ITEM_END, 1, LastError);
369}
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
#define PM_ITEM_START
Definition: globals.h:52
#define PM_ITEM_END
Definition: globals.h:57
static BOOL CreateShortcuts(_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify, _In_ HINF hinf, _In_ LPCWSTR szSection)
Definition: install.c:244
static LONG CountShortcuts(_In_ HINF hinf, _In_ LPCWSTR szSection)
Definition: install.c:288

Referenced by ItemCompletionThread().

◆ InstallSysSetupInfComponents()

static BOOL InstallSysSetupInfComponents ( VOID  )
static

Definition at line 461 of file install.c.

462{
463 INFCONTEXT InfContext;
464 WCHAR szNameBuffer[256];
465 WCHAR szSectionBuffer[256];
466 HINF hComponentInf = INVALID_HANDLE_VALUE;
467
469 L"Infs.Always",
470 NULL,
471 &InfContext))
472 {
473 DPRINT("No Inf.Always section found\n");
474 }
475 else
476 {
477 do
478 {
479 if (!SetupGetStringFieldW(&InfContext,
480 1, // Get the component name
481 szNameBuffer,
482 ARRAYSIZE(szNameBuffer),
483 NULL))
484 {
485 FatalError("Error while trying to get component name\n");
486 return FALSE;
487 }
488
489 if (!SetupGetStringFieldW(&InfContext,
490 2, // Get the component install section
491 szSectionBuffer,
492 ARRAYSIZE(szSectionBuffer),
493 NULL))
494 {
495 FatalError("Error while trying to get component install section\n");
496 return FALSE;
497 }
498
499 DPRINT("Trying to execute install section '%S' from '%S'\n", szSectionBuffer, szNameBuffer);
500
501 hComponentInf = SetupOpenInfFileW(szNameBuffer,
502 NULL,
504 NULL);
505
506 if (hComponentInf == INVALID_HANDLE_VALUE)
507 {
508 FatalError("SetupOpenInfFileW() failed to open '%S' (Error: %lu)\n", szNameBuffer, GetLastError());
509 return FALSE;
510 }
511
513 hComponentInf,
514 szSectionBuffer,
516 NULL,
517 NULL,
520 NULL,
521 NULL,
522 NULL))
523 {
524 FatalError("Error while trying to install : %S (Error: %lu)\n", szNameBuffer, GetLastError());
525 SetupCloseInfFile(hComponentInf);
526 return FALSE;
527 }
528
529 SetupCloseInfFile(hComponentInf);
530 }
531 while (SetupFindNextLine(&InfContext, &InfContext));
532 }
533
534 return TRUE;
535}
UINT WINAPI SetupDefaultQueueCallbackW(PVOID context, UINT notification, UINT_PTR param1, UINT_PTR param2)
Definition: queue.c:1729
#define SP_COPY_NEWER
Definition: setupapi.h:481
BOOL WINAPI SetupFindFirstLineW(IN HINF InfHandle, IN PCWSTR Section, IN PCWSTR Key, IN OUT PINFCONTEXT Context)
Definition: infsupp.c:56

Referenced by CommonInstall().

◆ InstallSysSetupInfDevices()

static BOOL InstallSysSetupInfDevices ( VOID  )
static

Definition at line 425 of file install.c.

426{
427 INFCONTEXT InfContext;
428 WCHAR szLineBuffer[256];
429 DWORD dwLineLength;
430
432 L"DeviceInfsToInstall",
433 NULL,
434 &InfContext))
435 {
436 return FALSE;
437 }
438
439 do
440 {
441 if (!SetupGetStringFieldW(&InfContext,
442 0,
443 szLineBuffer,
444 ARRAYSIZE(szLineBuffer),
445 &dwLineLength))
446 {
447 return FALSE;
448 }
449
450 if (!SetupDiInstallClassW(NULL, szLineBuffer, DI_QUIETINSTALL, NULL))
451 {
452 return FALSE;
453 }
454 }
455 while (SetupFindNextLine(&InfContext, &InfContext));
456
457 return TRUE;
458}
BOOL WINAPI SetupDiInstallClassW(HWND hwndParent, PCWSTR InfFileName, DWORD Flags, HSPFILEQ FileQueue)
Definition: devinst.c:3894
#define DI_QUIETINSTALL
Definition: setupapi.h:70

Referenced by CommonInstall().

◆ InstallWindowsNt()

INT WINAPI InstallWindowsNt ( INT  argc,
WCHAR **  argv 
)

Definition at line 1723 of file install.c.

1724{
1725 INT i;
1726 PWSTR p;
1727
1728 for (i = 0; i < argc; ++i)
1729 {
1730 p = argv[i];
1731 if (*p == L'-')
1732 {
1733 p++;
1734
1735 // NOTE: On Windows, "mini" means "minimal UI", and can be used
1736 // in addition to "newsetup"; these options are not exclusive.
1737 if (_wcsicmp(p, L"newsetup") == 0)
1738 return (INT)InstallReactOS();
1739 else if (_wcsicmp(p, L"mini") == 0)
1740 return (INT)InstallLiveCD();
1741
1742 /* Add support for other switches */
1743 }
1744 }
1745
1746 return 0;
1747}
MonoAssembly int argc
Definition: metahost.c:107
static DWORD InstallLiveCD(VOID)
Definition: install.c:1137
static DWORD InstallReactOS(VOID)
Definition: install.c:1594
GLfloat GLfloat p
Definition: glext.h:8902
#define argv
Definition: mplay32.c:18

◆ IsConsoleBoot()

static BOOL IsConsoleBoot ( VOID  )
static

Definition at line 945 of file install.c.

946{
947 HKEY hControlKey = NULL;
948 LPWSTR pwszSystemStartOptions = NULL;
949 LPWSTR pwszCurrentOption, pwszNextOption; /* Pointers into SystemStartOptions */
950 BOOL bConsoleBoot = FALSE;
951 LONG rc;
952
954 L"SYSTEM\\CurrentControlSet\\Control",
955 0,
957 &hControlKey);
958 if (rc != ERROR_SUCCESS)
959 goto cleanup;
960
961 rc = ReadRegSzKey(hControlKey, L"SystemStartOptions", &pwszSystemStartOptions);
962 if (rc != ERROR_SUCCESS)
963 goto cleanup;
964
965 /* Check for CONSOLE switch in SystemStartOptions */
966 pwszCurrentOption = pwszSystemStartOptions;
967 while (pwszCurrentOption)
968 {
969 pwszNextOption = wcschr(pwszCurrentOption, L' ');
970 if (pwszNextOption)
971 *pwszNextOption = L'\0';
972 if (_wcsicmp(pwszCurrentOption, L"CONSOLE") == 0)
973 {
974 DPRINT("Found %S. Switching to console boot\n", pwszCurrentOption);
975 bConsoleBoot = TRUE;
976 goto cleanup;
977 }
978 pwszCurrentOption = pwszNextOption ? pwszNextOption + 1 : NULL;
979 }
980
981cleanup:
982 if (hControlKey != NULL)
983 RegCloseKey(hControlKey);
984 if (pwszSystemStartOptions)
985 HeapFree(GetProcessHeap(), 0, pwszSystemStartOptions);
986 return bConsoleBoot;
987}
static LONG ReadRegSzKey(IN HKEY hKey, IN LPCWSTR pszKey, OUT LPWSTR *pValue)
Definition: install.c:253
#define wcschr
Definition: compat.h:17
#define GetProcessHeap()
Definition: compat.h:736
#define HeapFree(x, y, z)
Definition: compat.h:735

◆ PreprocessUnattend()

static VOID PreprocessUnattend ( _In_ BOOL  IsInstall)
static

Pre-process unattended file to apply early settings.

Parameters
[in]IsInstallTRUE if this is ReactOS installation, invoked from InstallReactOS(), FALSE if this is run as part of LiveCD, invoked form InstallLiveCD().

Definition at line 1023 of file install.c.

1025{
1027 WCHAR szValue[MAX_PATH];
1028 BOOL bDefaultThemesOff;
1029
1030 if (IsInstall)
1031 {
1032 /* See also wizard.c!ProcessSetupInf()
1033 * Retrieve the path of the setup INF */
1035 }
1036 else
1037 {
1038 /* See also userinit/livecd.c!RunLiveCD() */
1040 wcscat(szPath, L"\\unattend.inf");
1041 }
1042
1043 /*
1044 * Apply initial default theming
1045 */
1046
1047 /* Check whether to use the classic theme (TRUE) instead of the default theme */
1048 bDefaultThemesOff = FALSE;
1049 if (GetPrivateProfileStringW(L"Shell", L"DefaultThemesOff", L"no", szValue, _countof(szValue), szPath) && *szValue)
1050 bDefaultThemesOff = (_wcsicmp(szValue, L"yes") == 0);
1051
1052 if (!bDefaultThemesOff)
1053 {
1054 /* Retrieve the complete path to a .theme (or for ReactOS, a .msstyles) file */
1055 if (!GetPrivateProfileStringW(L"Shell", L"CustomDefaultThemeFile", NULL, szValue, _countof(szValue), szPath) || !*szValue)
1056 bDefaultThemesOff = TRUE; // None specified, fall back to the classic theme.
1057 }
1058
1059 /* Enable the chosen theme, or use the classic theme */
1060 EnableVisualTheme(NULL, bDefaultThemesOff ? NULL : szValue);
1061
1062 if (IsInstall)
1064}
VOID GetSetupInfPath(PWSTR szPath, UINT cchMax)
Definition: wizard.c:57
VOID EnableVisualTheme(_In_opt_ HWND hwndParent, _In_opt_ PCWSTR ThemeFile)
Definition: wizard.c:1474
static VOID ProcessDetachedProgram(_In_ PCWSTR pszInf)
Definition: install.c:990

Referenced by InstallLiveCD(), and InstallReactOS().

◆ ProcessDetachedProgram()

static VOID ProcessDetachedProgram ( _In_ PCWSTR  pszInf)
static

Definition at line 990 of file install.c.

992{
993 WCHAR szInfApp[MAX_PATH], szInfArg[MAX_PATH * 3];
994 WCHAR szCmd[_countof(szInfApp) + _countof(szInfArg)];
995 UINT cch;
996
997 if (!GetPrivateProfileStringW(L"GuiUnattended", L"DetachedProgram", L"", szInfApp, _countof(szInfApp), pszInf) || !*szInfApp)
998 return;
999 cch = ExpandEnvironmentStrings(szInfApp, szCmd, _countof(szCmd) - 1);
1000 if (GetPrivateProfileStringW(L"GuiUnattended", L"Arguments", L"", szInfArg, _countof(szInfArg), pszInf) && cch)
1001 {
1002 szCmd[cch - 1] = L' ';
1003 szCmd[cch] = UNICODE_NULL;
1004 ExpandEnvironmentStrings(szInfArg, szCmd + cch, _countof(szCmd) - cch);
1005 }
1006 RunCommandAndWait(szCmd);
1007}
unsigned int UINT
Definition: sysinfo.c:13
#define UNICODE_NULL
_In_ UINT _In_ UINT cch
Definition: shellapi.h:432
HRESULT RunCommandAndWait(_In_ PWCHAR Command)
Definition: addons.c:37
#define ExpandEnvironmentStrings
Definition: winbase.h:3495

Referenced by PreprocessUnattend().

◆ ReadRegSzKey()

static LONG ReadRegSzKey ( IN HKEY  hKey,
IN LPCWSTR  pszKey,
OUT LPWSTR pValue 
)
static

Definition at line 909 of file install.c.

913{
914 LONG rc;
915 DWORD dwType;
916 DWORD cbData = 0;
917 LPWSTR pwszValue;
918
919 if (!pValue)
921
922 *pValue = NULL;
923 rc = RegQueryValueExW(hKey, pszKey, NULL, &dwType, NULL, &cbData);
924 if (rc != ERROR_SUCCESS)
925 return rc;
926 if (dwType != REG_SZ)
928 pwszValue = HeapAlloc(GetProcessHeap(), 0, cbData + sizeof(WCHAR));
929 if (!pwszValue)
931 rc = RegQueryValueExW(hKey, pszKey, NULL, NULL, (LPBYTE)pwszValue, &cbData);
932 if (rc != ERROR_SUCCESS)
933 {
934 HeapFree(GetProcessHeap(), 0, pwszValue);
935 return rc;
936 }
937 /* NULL-terminate the string */
938 pwszValue[cbData / sizeof(WCHAR)] = '\0';
939
940 *pValue = pwszValue;
941 return ERROR_SUCCESS;
942}
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
#define ERROR_INVALID_PARAMETER
Definition: compat.h:101
#define HeapAlloc
Definition: compat.h:733
_In_opt_ _In_opt_ _In_ _In_ DWORD cbData
Definition: shlwapi.h:761

◆ RegisterTypeLibraries()

BOOL RegisterTypeLibraries ( _In_ PITEMSDATA  pItemsData,
_In_ PREGISTRATIONNOTIFY  pNotify,
_In_ HINF  hinf,
_In_ LPCWSTR  szSection 
)

Definition at line 540 of file install.c.

545{
546 INFCONTEXT InfContext;
547 BOOL res;
550 INT csidl;
551 LPWSTR p;
553 HRESULT hret;
554
555 /* Begin iterating the entries in the inf section */
556 res = SetupFindFirstLine(hinf, szSection, NULL, &InfContext);
557 if (!res) return FALSE;
558
559 do
560 {
561 /* Get the name of the current type library */
562 if (!SetupGetStringFieldW(&InfContext, 1, szName, ARRAYSIZE(szName), NULL))
563 {
564 FatalError("SetupGetStringFieldW failed\n");
565 continue;
566 }
567
568 if (!SetupGetIntField(&InfContext, 2, &csidl))
569 csidl = CSIDL_SYSTEM;
570
571 hret = SHGetFolderPathW(NULL, csidl, NULL, 0, szPath);
572 if (FAILED(hret))
573 {
574 FatalError("SHGetFolderPathW failed hret=0x%lx\n", hret);
575 continue;
576 }
577
579 wcscpy(p, szName);
580
581 if (pItemsData && pNotify)
582 {
583 pNotify->Progress++;
584 pNotify->CurrentItem = szName;
585
586 DPRINT("RegisterTypeLibraries: Start step %ld\n", pNotify->Progress);
587 SendMessage(pItemsData->hwndDlg, PM_STEP_START, 0, (LPARAM)pNotify);
588 }
589
591 if (hmod == NULL)
592 {
593 FatalError("LoadLibraryW failed\n");
594 continue;
595 }
596
598
599 if (pItemsData && pNotify)
600 {
601 DPRINT("RegisterTypeLibraries: End step %ld\n", pNotify->Progress);
602 SendMessage(pItemsData->hwndDlg, PM_STEP_END, 0, (LPARAM)pNotify);
603 }
604
605 } while (SetupFindNextLine(&InfContext, &InfContext));
606
607 return TRUE;
608}
HRESULT __wine_register_resources(HMODULE module)
Definition: register.c:112
#define LoadLibraryW(x)
Definition: compat.h:747
HRESULT WINAPI SHGetFolderPathW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPWSTR pszPath)
Definition: shellpath.c:2717
GLuint res
Definition: glext.h:9613
static NTSTATUS *static PWSTR CURDIR *static HMODULE hmod
Definition: security.c:104
#define CSIDL_SYSTEM
Definition: shlobj.h:2227

Referenced by InstallLiveCD(), and RegisterComponents().

◆ SaveDefaultUserHive()

static DWORD SaveDefaultUserHive ( VOID  )
static

Definition at line 1520 of file install.c.

1521{
1522 WCHAR szDefaultUserHive[MAX_PATH];
1523 HKEY hUserKey = NULL;
1524 DWORD cchSize;
1525 DWORD dwError;
1526
1527 DPRINT("SaveDefaultUserHive()\n");
1528
1529 cchSize = ARRAYSIZE(szDefaultUserHive);
1530 GetDefaultUserProfileDirectoryW(szDefaultUserHive, &cchSize);
1531
1532 wcscat(szDefaultUserHive, L"\\ntuser.dat");
1533
1534 dwError = RegOpenKeyExW(HKEY_USERS,
1535 L".DEFAULT",
1536 0,
1537 KEY_READ,
1538 &hUserKey);
1539 if (dwError != ERROR_SUCCESS)
1540 {
1541 DPRINT1("RegOpenKeyExW() failed (Error %lu)\n", dwError);
1542 return dwError;
1543 }
1544
1546 DPRINT1("pSetupEnablePrivilege(SE_BACKUP_NAME) failed (Error %lu)\n", GetLastError());
1547
1548 /* Save the Default hive */
1549 dwError = RegSaveKeyExW(hUserKey,
1550 szDefaultUserHive,
1551 NULL,
1553 if (dwError == ERROR_ALREADY_EXISTS)
1554 {
1555 WCHAR szBackupHive[MAX_PATH];
1556
1557 /* Build the backup hive file name by replacing the extension */
1558 wcscpy(szBackupHive, szDefaultUserHive);
1559 wcscpy(&szBackupHive[wcslen(szBackupHive) - 4], L".bak");
1560
1561 /* Back up the existing default user hive by renaming it, replacing any possible existing old backup */
1562 if (!MoveFileExW(szDefaultUserHive,
1563 szBackupHive,
1565 {
1566 dwError = GetLastError();
1567 DPRINT1("Failed to create a default-user hive backup '%S', MoveFileExW failed (Error %lu)\n",
1568 szBackupHive, dwError);
1569 }
1570 else
1571 {
1572 /* The backup has been done, retry saving the Default hive */
1573 dwError = RegSaveKeyExW(hUserKey,
1574 szDefaultUserHive,
1575 NULL,
1577 }
1578 }
1579 if (dwError != ERROR_SUCCESS)
1580 {
1581 DPRINT1("RegSaveKeyExW() failed (Error %lu)\n", dwError);
1582 }
1583
1585
1586 RegCloseKey(hUserKey);
1587
1588 return dwError;
1589}
#define SE_BACKUP_NAME
LONG WINAPI RegSaveKeyExW(HKEY hKey, LPCWSTR lpFile, LPSECURITY_ATTRIBUTES lpSecurityAttributes, DWORD Flags)
Definition: reg.c:4730
BOOL WINAPI MoveFileExW(IN LPCWSTR lpExistingFileName, IN LPCWSTR lpNewFileName OPTIONAL, IN DWORD dwFlags)
Definition: move.c:1074
BOOL WINAPI GetDefaultUserProfileDirectoryW(_Out_opt_ LPWSTR lpProfileDir, _Inout_ LPDWORD lpcchSize)
Definition: profile.c:1443
#define MOVEFILE_REPLACE_EXISTING
Definition: filesup.h:28
#define REG_STANDARD_FORMAT
Definition: cmtypes.h:97

Referenced by InstallReactOS().

◆ SetSetupType()

static BOOL SetSetupType ( DWORD  dwSetupType)
static

Definition at line 1218 of file install.c.

1219{
1220 DWORD dwError;
1221 HKEY hKey;
1222
1223 dwError = RegOpenKeyExW(
1225 L"SYSTEM\\Setup",
1226 0,
1228 &hKey);
1229 if (dwError != ERROR_SUCCESS)
1230 return FALSE;
1231
1232 dwError = RegSetValueExW(
1233 hKey,
1234 L"SetupType",
1235 0,
1236 REG_DWORD,
1237 (LPBYTE)&dwSetupType,
1238 sizeof(DWORD));
1240 if (dwError != ERROR_SUCCESS)
1241 return FALSE;
1242
1243 return TRUE;
1244}
#define REG_DWORD
Definition: sdbapi.c:615

Referenced by InstallReactOS().

◆ SetupChangeFontSize()

DWORD WINAPI SetupChangeFontSize ( IN HANDLE  hWnd,
IN LPCWSTR  lpszFontSize 
)

Definition at line 1754 of file install.c.

1757{
1759 return FALSE;
1760}
#define ERROR_CALL_NOT_IMPLEMENTED
Definition: compat.h:102
#define SetLastError(x)
Definition: compat.h:752

◆ SetupChangeLocale()

DWORD WINAPI SetupChangeLocale ( HWND  hWnd,
LCID  Lcid 
)

Definition at line 1781 of file install.c.

1782{
1783 return SetupChangeLocaleEx(hWnd, Lcid, NULL, 0, 0, 0);
1784}
HWND hWnd
Definition: settings.c:17
DWORD WINAPI SetupChangeLocaleEx(HWND hWnd, LCID Lcid, LPCWSTR lpSrcRootPath, char Unknown, DWORD dwUnused1, DWORD dwUnused2)
Definition: install.c:1766
_In_ CONST DEVPROPKEY _In_ LCID Lcid
Definition: iofuncs.h:2415

◆ SetupChangeLocaleEx()

DWORD WINAPI SetupChangeLocaleEx ( HWND  hWnd,
LCID  Lcid,
LPCWSTR  lpSrcRootPath,
char  Unknown,
DWORD  dwUnused1,
DWORD  dwUnused2 
)

Definition at line 1766 of file install.c.

1772{
1774 return FALSE;
1775}

Referenced by SetupChangeLocale().

◆ SetupStartService()

DWORD WINAPI SetupStartService ( LPCWSTR  lpServiceName,
BOOL  bWait 
)

Definition at line 1789 of file install.c.

1792{
1793 SC_HANDLE hManager = NULL;
1794 SC_HANDLE hService = NULL;
1795 DWORD dwError = ERROR_SUCCESS;
1796
1797 hManager = OpenSCManagerW(NULL,
1798 NULL,
1800 if (hManager == NULL)
1801 {
1802 dwError = GetLastError();
1803 goto done;
1804 }
1805
1806 hService = OpenServiceW(hManager,
1807 lpServiceName,
1809 if (hService == NULL)
1810 {
1811 dwError = GetLastError();
1812 goto done;
1813 }
1814
1815 if (!StartService(hService, 0, NULL))
1816 {
1817 dwError = GetLastError();
1818 goto done;
1819 }
1820
1821done:
1822 if (hService != NULL)
1823 CloseServiceHandle(hService);
1824
1825 if (hManager != NULL)
1826 CloseServiceHandle(hManager);
1827
1828 return dwError;
1829}
#define StartService
Definition: winsvc.h:591
#define SC_MANAGER_ALL_ACCESS
Definition: winsvc.h:13

Referenced by InstallLiveCD(), and InstallReactOS().

◆ ShowStatusMessageThread()

static DWORD WINAPI ShowStatusMessageThread ( IN LPVOID  lpParameter)
static

Definition at line 879 of file install.c.

881{
882 HWND hWnd;
883 MSG Msg;
884 UNREFERENCED_PARAMETER(lpParameter);
885
890 (LPARAM)NULL);
891 if (!hWnd)
892 return 0;
893
895
896 /* Message loop for the Status window */
897 while (GetMessage(&Msg, NULL, 0, 0))
898 {
901 }
902
903 EndDialog(hWnd, 0);
904
905 return 0;
906}
struct @1803 Msg[]
static INT_PTR CALLBACK StatusMessageWindowProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: install.c:759
#define IDD_STATUSWINDOW_DLG
Definition: resource.h:98
#define UNREFERENCED_PARAMETER(P)
Definition: ntbasedef.h:329
#define MAKEINTRESOURCE(i)
Definition: ntverrsrc.c:25
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define CreateDialogParam
Definition: winuser.h:5918
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:628
#define GetMessage
Definition: winuser.h:5956
#define SW_SHOW
Definition: winuser.h:786
#define DispatchMessage
Definition: winuser.h:5931
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

Referenced by CommonInstall().

◆ StatusMessageWindowProc()

static INT_PTR CALLBACK StatusMessageWindowProc ( IN HWND  hwndDlg,
IN UINT  uMsg,
IN WPARAM  wParam,
IN LPARAM  lParam 
)
static

Definition at line 759 of file install.c.

764{
765 PDLG_DATA pDlgData;
767
768 pDlgData = (PDLG_DATA)GetWindowLongPtrW(hwndDlg, DWLP_USER);
769
770 /* pDlgData is required for each case except WM_INITDIALOG */
771 if (uMsg != WM_INITDIALOG && pDlgData == NULL) return FALSE;
772
773 switch (uMsg)
774 {
775 case WM_INITDIALOG:
776 {
777 BITMAP bm;
778 WCHAR szMsg[256];
779
780 /* Allocate pDlgData */
781 pDlgData = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(*pDlgData));
782 if (pDlgData)
783 {
784 /* Set pDlgData to DWLP_USER, so we can get it for new messages */
785 SetWindowLongPtrW(hwndDlg, DWLP_USER, (LONG_PTR)pDlgData);
786
787 /* Load bitmaps */
790 0, 0, LR_DEFAULTCOLOR);
791
794 GetObject(pDlgData->hBarBitmap, sizeof(bm), &bm);
795 pDlgData->BarWidth = bm.bmWidth;
796 pDlgData->BarHeight = bm.bmHeight;
797
798 if (pDlgData->hLogoBitmap && pDlgData->hBarBitmap)
799 {
800 if (SetTimer(hwndDlg, IDT_BAR, 20, NULL) == 0)
801 {
802 DPRINT1("SetTimer(IDT_BAR) failed: %lu\n", GetLastError());
803 }
804
805 /* Get the animation bar control */
806 pDlgData->hWndBarCtrl = GetDlgItem(hwndDlg, IDC_BAR);
807 }
808 }
809
810 /* Get and set status text */
812 return FALSE;
813 SetDlgItemTextW(hwndDlg, IDC_STATUSLABEL, szMsg);
814
815 AdjustStatusMessageWindow(hwndDlg, pDlgData);
816 return TRUE;
817 }
818
819 case WM_TIMER:
820 {
821 if (pDlgData->hBarBitmap)
822 {
823 /*
824 * Default rotation bar image width is 413 (same as logo)
825 * We can divide 413 by 7 without remainder
826 */
827 pDlgData->BarCounter = (pDlgData->BarCounter + 7) % pDlgData->BarWidth;
829 UpdateWindow(pDlgData->hWndBarCtrl);
830 }
831 return TRUE;
832 }
833
834 case WM_DRAWITEM:
835 {
837
838 if (lpDis->CtlID != IDC_BAR)
839 {
840 return FALSE;
841 }
842
843 if (pDlgData->hBarBitmap)
844 {
845 HDC hdcMem;
846 HGDIOBJ hOld;
847 DWORD off = pDlgData->BarCounter;
848 DWORD iw = pDlgData->BarWidth;
849 DWORD ih = pDlgData->BarHeight;
850
851 hdcMem = CreateCompatibleDC(lpDis->hDC);
852 hOld = SelectObject(hdcMem, pDlgData->hBarBitmap);
853 BitBlt(lpDis->hDC, off, 0, iw - off, ih, hdcMem, 0, 0, SRCCOPY);
854 BitBlt(lpDis->hDC, 0, 0, off, ih, hdcMem, iw - off, 0, SRCCOPY);
855 SelectObject(hdcMem, hOld);
857 return TRUE;
858 }
859 return FALSE;
860 }
861
862 case WM_DESTROY:
863 {
864 if (pDlgData->hBarBitmap)
865 {
866 KillTimer(hwndDlg, IDT_BAR);
867 }
868
869 DeleteObject(pDlgData->hLogoBitmap);
870 DeleteObject(pDlgData->hBarBitmap);
871 HeapFree(GetProcessHeap(), 0, pDlgData);
872 return TRUE;
873 }
874 }
875 return FALSE;
876}
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define IDT_BAR
Definition: gui.c:32
struct _DLG_DATA * PDLG_DATA
static VOID AdjustStatusMessageWindow(HWND hwndDlg, PDLG_DATA pDlgData)
Definition: install.c:695
#define IDS_STATUS_INSTALL_DEV
Definition: resource.h:161
#define IDB_LINE
Definition: resource.h:28
static VOID BitBlt(_In_ ULONG Left, _In_ ULONG Top, _In_ ULONG Width, _In_ ULONG Height, _In_reads_bytes_(Height *Stride) PUCHAR Buffer, _In_ ULONG BitsPerPixel, _In_ ULONG Stride)
Definition: common.c:42
pKey DeleteObject()
static HDC
Definition: imagelist.c:88
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define IDB_REACTOS
Definition: shresdef.h:30
Definition: gui.c:37
DWORD BarHeight
Definition: gui.c:46
DWORD BarWidth
Definition: gui.c:45
HWND hWndBarCtrl
Definition: gui.c:41
DWORD BarCounter
Definition: gui.c:42
HDC hdcMem
Definition: welcome.c:104
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
Definition: dc.c:1546
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
#define SRCCOPY
Definition: wingdi.h:333
#define GetObject
Definition: wingdi.h:4914
BOOL WINAPI DeleteDC(_In_ HDC)
struct tagDRAWITEMSTRUCT * LPDRAWITEMSTRUCT
#define IMAGE_BITMAP
Definition: winuser.h:211
#define DWLP_USER
Definition: winuser.h:883
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
Definition: cursoricon.c:2572
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define WM_INITDIALOG
Definition: winuser.h:1767
#define WM_DRAWITEM
Definition: winuser.h:1673
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define WM_TIMER
Definition: winuser.h:1770
BOOL WINAPI UpdateWindow(_In_ HWND)
#define LR_DEFAULTCOLOR
Definition: winuser.h:1098
#define WM_DESTROY
Definition: winuser.h:1637
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SetWindowLongPtrW
Definition: winuser.h:5512

Referenced by ShowStatusMessageThread().

Variable Documentation

◆ AdminInfo

ADMIN_INFO AdminInfo

Definition at line 39 of file install.c.

Referenced by InstallReactOS(), SetAdministratorPassword(), and SetAutoAdminLogon().

◆ hSysSetupInf