ReactOS 0.4.16-dev-1025-gd3456f5
wizard.c File Reference
#include "precomp.h"
#include <stdlib.h>
#include <time.h>
#include <winnls.h>
#include <windowsx.h>
#include <wincon.h>
#include <shlobj.h>
#include <shlwapi.h>
#include <tzlib.h>
#include <strsafe.h>
#include <debug.h>
Include dependency graph for wizard.c:

Go to the source code of this file.

Classes

struct  _REGISTRATIONDATA
 
struct  _TIMEZONE_ENTRY
 
struct  _PRODUCT_OPTION_DATA
 
struct  ThemeInfo
 

Macros

#define NDEBUG
 
#define MAX_LAYOUTS_PER_LANGID   0x10000
 

Typedefs

typedef struct _REGISTRATIONDATA REGISTRATIONDATA
 
typedef struct _REGISTRATIONDATAPREGISTRATIONDATA
 
typedef struct _TIMEZONE_ENTRY TIMEZONE_ENTRY
 
typedef struct _TIMEZONE_ENTRYPTIMEZONE_ENTRY
 
typedef struct _PRODUCT_OPTION_DATA PRODUCT_OPTION_DATA
 
typedef DWORD(WINAPIPFNREQUESTWIZARDPAGES) (PDWORD, HPROPSHEETPAGE *, PSETUPDATA)
 

Functions

void WINAPI Control_RunDLLW (HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow)
 
static VOID CenterWindow (HWND hWnd)
 
static HFONT CreateTitleFont (VOID)
 
static HFONT CreateBoldFont (VOID)
 
static INT_PTR CALLBACK GplDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static INT_PTR CALLBACK WelcomeDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static INT_PTR CALLBACK AckPageDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static BOOL DoWriteSoundEvents (HKEY hKey, LPCWSTR lpSubkey, LPCWSTR lpEventsArray[][2], DWORD dwSize)
 
static BOOL DoWriteProductOption (PRODUCT_OPTION nOption)
 
static void OnChooseOption (HWND hwndDlg, PRODUCT_OPTION nOption)
 
static INT_PTR CALLBACK ProductPageDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static BOOL WriteOwnerSettings (WCHAR *OwnerName, WCHAR *OwnerOrganization)
 
static INT_PTR CALLBACK OwnerPageDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static BOOL WriteComputerSettings (WCHAR *ComputerName, HWND hwndDlg)
 
static BOOL WriteDefaultLogonData (LPWSTR Domain)
 
static void GenerateComputerName (LPWSTR lpBuffer)
 
static INT_PTR CALLBACK ComputerPageDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static VOID SetUserLocaleName (HWND hwnd)
 
static VOID SetKeyboardLayoutName (HWND hwnd)
 
static BOOL RunControlPanelApplet (HWND hwnd, PCWSTR pwszCPLParameters)
 
VOID EnableVisualTheme (_In_opt_ HWND hwndParent, _In_opt_ PCWSTR ThemeFile)
 
static VOID WriteUserLocale (VOID)
 
static INT_PTR CALLBACK LocalePageDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static PTIMEZONE_ENTRY GetLargerTimeZoneEntry (PSETUPDATA SetupData, DWORD Index)
 
static LONG RetrieveTimeZone (IN HKEY hZoneKey, IN PVOID Context)
 
static VOID CreateTimeZoneList (PSETUPDATA SetupData)
 
static VOID DestroyTimeZoneList (PSETUPDATA SetupData)
 
static VOID ShowTimeZoneList (HWND hwnd, PSETUPDATA SetupData, DWORD dwEntryIndex)
 
static VOID SetLocalTimeZone (HWND hwnd, PSETUPDATA SetupData)
 
static BOOL GetLocalSystemTime (HWND hwnd, PSETUPDATA SetupData)
 
static BOOL SetSystemLocalTime (HWND hwnd, PSETUPDATA SetupData)
 
static VOID UpdateLocalSystemTime (HWND hwnd, SYSTEMTIME LocalTime)
 
static BOOL WriteDateTimeSettings (HWND hwndDlg, PSETUPDATA SetupData)
 
static INT_PTR CALLBACK DateTimePageDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static INT_PTR CALLBACK ThemePageDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static UINT CALLBACK RegistrationNotificationProc (PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
 
static DWORD RegisterDlls (_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify)
 
static VOID RegisterComponents (PITEMSDATA pItemsData)
 
static DWORD CALLBACK ItemCompletionThread (LPVOID Parameter)
 
static BOOL RunItemCompletionThread (_In_ HWND hwndDlg)
 
static VOID ShowItemError (HWND hwndDlg, DWORD LastError)
 
static VOID ShowStepError (HWND hwndDlg, PREGISTRATIONNOTIFY RegistrationNotify)
 
static INT_PTR CALLBACK ProcessPageDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static VOID SetInstallationCompleted (VOID)
 
static INT_PTR CALLBACK FinishDlgProc (HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static BOOL GetInstallSourceWin32 (OUT PWSTR pwszPath, IN DWORD cchPathMax, IN PCWSTR pwszNTPath)
 
VOID ProcessUnattendSection (IN OUT PSETUPDATA pSetupData)
 
static BOOL PathIsEqual (IN LPCWSTR lpPath1, IN LPCWSTR lpPath2)
 
static VOID AddInstallationSource (IN HKEY hKey, IN LPWSTR lpPath)
 
VOID ProcessSetupInf (IN OUT PSETUPDATA pSetupData)
 
VOID InstallWizard (VOID)
 

Variables

static const WCHAR s_szProductOptions [] = L"SYSTEM\\CurrentControlSet\\Control\\ProductOptions"
 
static const WCHAR s_szRosVersion [] = L"SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version"
 
static const WCHAR s_szControlWindows [] = L"SYSTEM\\CurrentControlSet\\Control\\Windows"
 
static const WCHAR s_szWinlogon [] = L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"
 
static const WCHAR s_szDefaultSoundEvents [] = L"AppEvents\\Schemes\\Apps\\.Default"
 
static const WCHAR s_szExplorerSoundEvents [] = L"AppEvents\\Schemes\\Apps\\Explorer"
 
static const PRODUCT_OPTION_DATA s_ProductOptionData []
 
static const WCHARs_DefaultSoundEvents [][2]
 
static const WCHARs_ExplorerSoundEvents [][2]
 
static struct ThemeInfo Themes []
 

Macro Definition Documentation

◆ MAX_LAYOUTS_PER_LANGID

#define MAX_LAYOUTS_PER_LANGID   0x10000

◆ NDEBUG

#define NDEBUG

Definition at line 27 of file wizard.c.

Typedef Documentation

◆ PFNREQUESTWIZARDPAGES

typedef DWORD(WINAPI * PFNREQUESTWIZARDPAGES) (PDWORD, HPROPSHEETPAGE *, PSETUPDATA)

Definition at line 3241 of file wizard.c.

◆ PREGISTRATIONDATA

◆ PRODUCT_OPTION_DATA

◆ PTIMEZONE_ENTRY

◆ REGISTRATIONDATA

◆ TIMEZONE_ENTRY

Function Documentation

◆ AckPageDlgProc()

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

Definition at line 275 of file wizard.c.

279{
280 LPNMHDR lpnm;
281 PWCHAR Projects;
282 PWCHAR End, CurrentProject;
283 INT ProjectsSize, ProjectsCount;
284 PSETUPDATA pSetupData;
285
286 pSetupData = (PSETUPDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
287
288 switch (uMsg)
289 {
290 case WM_INITDIALOG:
291 {
292 pSetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
293 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pSetupData);
294
295 Projects = NULL;
296 ProjectsSize = 256;
297 while (TRUE)
298 {
299 Projects = HeapAlloc(GetProcessHeap(), 0, ProjectsSize * sizeof(WCHAR));
300 if (NULL == Projects)
301 {
302 return FALSE;
303 }
304 ProjectsCount = LoadStringW(hDllInstance, IDS_ACKPROJECTS, Projects, ProjectsSize);
305 if (0 == ProjectsCount)
306 {
307 HeapFree(GetProcessHeap(), 0, Projects);
308 return FALSE;
309 }
310 if (ProjectsCount < ProjectsSize - 1)
311 {
312 break;
313 }
314 HeapFree(GetProcessHeap(), 0, Projects);
315 ProjectsSize *= 2;
316 }
317
318 CurrentProject = Projects;
319 while (*CurrentProject != L'\0')
320 {
321 End = wcschr(CurrentProject, L'\n');
322 if (NULL != End)
323 {
324 *End = L'\0';
325 }
326 (void)ListBox_AddString(GetDlgItem(hwndDlg, IDC_PROJECTS), CurrentProject);
327 if (NULL != End)
328 {
329 CurrentProject = End + 1;
330 }
331 else
332 {
333 CurrentProject += wcslen(CurrentProject);
334 }
335 }
336 HeapFree(GetProcessHeap(), 0, Projects);
337 }
338 break;
339
340 case WM_COMMAND:
342 {
345 }
346 break;
347
348 case WM_NOTIFY:
349 {
350 lpnm = (LPNMHDR)lParam;
351
352 switch (lpnm->code)
353 {
354 case PSN_SETACTIVE:
355 /* Enable the Back and Next buttons */
357 if (pSetupData->UnattendSetup)
358 {
360 return TRUE;
361 }
362 break;
363
364 case PSN_WIZBACK:
365 pSetupData->UnattendSetup = FALSE;
366 break;
367
368 default:
369 break;
370 }
371 }
372 break;
373
374 default:
375 break;
376 }
377
378 return FALSE;
379}
struct _SETUPDATA * PSETUPDATA
static HINSTANCE hDllInstance
Definition: clb.c:9
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define wcschr
Definition: compat.h:17
#define GetProcessHeap()
Definition: compat.h:736
#define HeapAlloc
Definition: compat.h:733
#define HeapFree(x, y, z)
Definition: compat.h:735
#define IDD_PRODUCT
Definition: resource.h:102
#define IDC_VIEWGPL
Definition: resource.h:43
#define IDD_GPL
Definition: resource.h:85
#define IDC_PROJECTS
Definition: resource.h:42
#define IDS_ACKPROJECTS
Definition: resource.h:130
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
__int3264 LONG_PTR
Definition: mstsclib_h.h:276
#define L(x)
Definition: ntvdm.h:50
#define MAKEINTRESOURCE(i)
Definition: ntverrsrc.c:25
#define LOWORD(l)
Definition: pedump.c:82
#define PSWIZB_NEXT
Definition: prsht.h:154
#define PSWIZB_BACK
Definition: prsht.h:153
#define PropSheet_SetWizButtons(d, f)
Definition: prsht.h:357
#define LPPROPSHEETPAGE
Definition: prsht.h:390
#define PSN_WIZBACK
Definition: prsht.h:120
#define PSN_SETACTIVE
Definition: prsht.h:115
#define WM_NOTIFY
Definition: richedit.h:61
BOOL UnattendSetup
Definition: syssetup.h:46
UINT code
Definition: winuser.h:3170
static INT_PTR CALLBACK GplDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: wizard.c:122
#define GetWindowLongPtr
Definition: treelist.c:73
#define SetWindowLongPtr
Definition: treelist.c:70
int32_t INT
Definition: typedefs.h:58
uint16_t * PWCHAR
Definition: typedefs.h:56
#define HIWORD(l)
Definition: typedefs.h:247
#define ListBox_AddString(hwndCtl, lpsz)
Definition: windowsx.h:472
#define DWLP_USER
Definition: winuser.h:883
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
#define WM_COMMAND
Definition: winuser.h:1751
BOOL WINAPI SetForegroundWindow(_In_ HWND)
#define WM_INITDIALOG
Definition: winuser.h:1750
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
struct tagNMHDR * LPNMHDR
HWND WINAPI GetParent(_In_ HWND)
#define DWLP_MSGRESULT
Definition: winuser.h:881
#define BN_CLICKED
Definition: winuser.h:1936
#define DialogBox
Definition: winuser.h:5781
__wchar_t WCHAR
Definition: xmlstorage.h:180

Referenced by InstallWizard().

◆ AddInstallationSource()

static VOID AddInstallationSource ( IN HKEY  hKey,
IN LPWSTR  lpPath 
)
static

Definition at line 3018 of file wizard.c.

3021{
3022 LONG res;
3023 DWORD dwRegType;
3024 DWORD dwPathLength = 0;
3025 DWORD dwNewLength = 0;
3026 LPWSTR Buffer = NULL;
3027 LPWSTR Path;
3028
3030 hKey,
3031 L"Installation Sources",
3032 NULL,
3033 &dwRegType,
3034 NULL,
3035 &dwPathLength);
3036
3037 if (res != ERROR_SUCCESS ||
3038 dwRegType != REG_MULTI_SZ ||
3039 dwPathLength == 0 ||
3040 dwPathLength % sizeof(WCHAR) != 0)
3041 {
3042 dwPathLength = 0;
3043 goto set;
3044 }
3045
3046 /* Reserve space for existing data + new string */
3047 dwNewLength = dwPathLength + (wcslen(lpPath) + 1) * sizeof(WCHAR);
3048 Buffer = HeapAlloc(GetProcessHeap(), 0, dwNewLength);
3049 if (!Buffer)
3050 return;
3051
3052 ZeroMemory(Buffer, dwNewLength);
3053
3055 hKey,
3056 L"Installation Sources",
3057 NULL,
3058 NULL,
3059 (LPBYTE)Buffer,
3060 &dwPathLength);
3061
3062 if (res != ERROR_SUCCESS)
3063 {
3065 dwPathLength = 0;
3066 goto set;
3067 }
3068
3069 /* Sanity check, these should already be zeros */
3070 Buffer[dwPathLength / sizeof(WCHAR) - 2] = UNICODE_NULL;
3071 Buffer[dwPathLength / sizeof(WCHAR) - 1] = UNICODE_NULL;
3072
3073 for (Path = Buffer; *Path; Path += wcslen(Path) + 1)
3074 {
3075 /* Check if path is already added */
3076 if (PathIsEqual(Path, lpPath))
3077 goto cleanup;
3078 }
3079
3080 Path = Buffer + dwPathLength / sizeof(WCHAR) - 1;
3081
3082set:
3083 if (dwPathLength == 0)
3084 {
3085 dwNewLength = (wcslen(lpPath) + 1 + 1) * sizeof(WCHAR);
3086 Buffer = HeapAlloc(GetProcessHeap(), 0, dwNewLength);
3087 if (!Buffer)
3088 return;
3089
3090 Path = Buffer;
3091 }
3092
3093 StringCbCopyW(Path, dwNewLength - (Path - Buffer) * sizeof(WCHAR), lpPath);
3094 Buffer[dwNewLength / sizeof(WCHAR) - 1] = UNICODE_NULL;
3095
3097 hKey,
3098 L"Installation Sources",
3099 0,
3101 (LPBYTE)Buffer,
3102 dwNewLength);
3103
3104cleanup:
3106}
PRTL_UNICODE_STRING_BUFFER Path
Definition: bufpool.h:45
Definition: _set.h:50
#define ERROR_SUCCESS
Definition: deptool.c:10
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
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 void cleanup(void)
Definition: main.c:1335
unsigned long DWORD
Definition: ntddk_ex.h:95
FxAutoRegKey hKey
GLuint res
Definition: glext.h:9613
#define REG_MULTI_SZ
Definition: nt_native.h:1501
#define UNICODE_NULL
long LONG
Definition: pedump.c:60
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:166
static BOOL PathIsEqual(IN LPCWSTR lpPath1, IN LPCWSTR lpPath2)
Definition: wizard.c:2992
unsigned char * LPBYTE
Definition: typedefs.h:53
#define ZeroMemory
Definition: winbase.h:1743
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by ProcessSetupInf().

◆ CenterWindow()

static VOID CenterWindow ( HWND  hWnd)
static

Definition at line 56 of file wizard.c.

57{
59 RECT rcParent;
60 RECT rcWindow;
61
63 if (hWndParent == NULL)
65
66 GetWindowRect(hWndParent, &rcParent);
67 GetWindowRect(hWnd, &rcWindow);
68
71 ((rcParent.right - rcParent.left) - (rcWindow.right - rcWindow.left)) / 2,
72 ((rcParent.bottom - rcParent.top) - (rcWindow.bottom - rcWindow.top)) / 2,
73 0,
74 0,
76}
HWND hWnd
Definition: settings.c:17
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOSIZE
Definition: winuser.h:1256
HWND WINAPI GetDesktopWindow(void)
Definition: window.c:628
#define HWND_TOP
Definition: winuser.h:1218

◆ ComputerPageDlgProc()

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

Definition at line 1044 of file wizard.c.

1048{
1049 WCHAR ComputerName[MAX_COMPUTERNAME_LENGTH + 1];
1050 WCHAR Password1[128];
1051 WCHAR Password2[128];
1053 WCHAR Title[64];
1054 WCHAR EmptyComputerName[256], NotMatchPassword[256], WrongPassword[256];
1055 LPNMHDR lpnm;
1056 PSETUPDATA pSetupData;
1057
1058 pSetupData = (PSETUPDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
1059
1061 {
1062 wcscpy(Title, L"ReactOS Setup");
1063 }
1064
1065 switch (uMsg)
1066 {
1067 case WM_INITDIALOG:
1068 pSetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
1069 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pSetupData);
1070
1071 /* Generate a new pseudo-random computer name */
1072 GenerateComputerName(ComputerName);
1073
1074 /* Display current computer name */
1075 SetDlgItemTextW(hwndDlg, IDC_COMPUTERNAME, ComputerName);
1076
1077 /* Set text limits */
1081
1082 /* Set focus to computer name */
1084 if (pSetupData->UnattendSetup)
1085 {
1091 }
1092
1093 /* Store the administrator account name as the default user name */
1095 break;
1096
1097
1098 case WM_NOTIFY:
1099 {
1100 lpnm = (LPNMHDR)lParam;
1101
1102 switch (lpnm->code)
1103 {
1104 case PSN_SETACTIVE:
1105 /* Enable the Back and Next buttons */
1107 if (pSetupData->UnattendSetup && WriteComputerSettings(pSetupData->ComputerName, hwndDlg))
1108 {
1110 return TRUE;
1111 }
1112 break;
1113
1114 case PSN_WIZNEXT:
1115 if (0 == GetDlgItemTextW(hwndDlg, IDC_COMPUTERNAME, ComputerName, MAX_COMPUTERNAME_LENGTH + 1))
1116 {
1117 if (0 == LoadStringW(hDllInstance, IDS_WZD_COMPUTERNAME, EmptyComputerName,
1118 ARRAYSIZE(EmptyComputerName)))
1119 {
1120 wcscpy(EmptyComputerName, L"Setup cannot continue until you enter the name of your computer.");
1121 }
1122 MessageBoxW(hwndDlg, EmptyComputerName, Title, MB_ICONERROR | MB_OK);
1124 SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1);
1125 return TRUE;
1126 }
1127
1128 /* No need to check computer name for invalid characters,
1129 * SetComputerName() will do it for us */
1130
1131 if (!WriteComputerSettings(ComputerName, hwndDlg))
1132 {
1134 SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1);
1135 return TRUE;
1136 }
1137
1138#ifdef PASSWORDS_MANDATORY
1139 /* Check if admin passwords have been entered */
1140 if ((GetDlgItemText(hwndDlg, IDC_ADMINPASSWORD1, Password1, 128) == 0) ||
1141 (GetDlgItemText(hwndDlg, IDC_ADMINPASSWORD2, Password2, 128) == 0))
1142 {
1143 if (0 == LoadStringW(hDllInstance, IDS_WZD_PASSWORDEMPTY, EmptyPassword,
1144 ARRAYSIZE(EmptyPassword)))
1145 {
1146 wcscpy(EmptyPassword, L"You must enter a password !");
1147 }
1148 MessageBoxW(hwndDlg, EmptyPassword, Title, MB_ICONERROR | MB_OK);
1149 SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1);
1150 return TRUE;
1151 }
1152#else
1153 GetDlgItemTextW(hwndDlg, IDC_ADMINPASSWORD1, Password1, 128);
1154 GetDlgItemTextW(hwndDlg, IDC_ADMINPASSWORD2, Password2, 128);
1155#endif
1156 /* Check if passwords match */
1157 if (wcscmp(Password1, Password2))
1158 {
1159 if (0 == LoadStringW(hDllInstance, IDS_WZD_PASSWORDMATCH, NotMatchPassword,
1160 ARRAYSIZE(NotMatchPassword)))
1161 {
1162 wcscpy(NotMatchPassword, L"The passwords you entered do not match. Please enter the desired password again.");
1163 }
1164 MessageBoxW(hwndDlg, NotMatchPassword, Title, MB_ICONERROR | MB_OK);
1165 SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1);
1166 return TRUE;
1167 }
1168
1169 /* Check password for invalid characters */
1170 Password = (PWCHAR)Password1;
1171 while (*Password)
1172 {
1173 if (!isprint(*Password))
1174 {
1175 if (0 == LoadStringW(hDllInstance, IDS_WZD_PASSWORDCHAR, WrongPassword,
1176 ARRAYSIZE(WrongPassword)))
1177 {
1178 wcscpy(WrongPassword, L"The password you entered contains invalid characters. Please enter a cleaned password.");
1179 }
1180 MessageBoxW(hwndDlg, WrongPassword, Title, MB_ICONERROR | MB_OK);
1181 SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1);
1182 return TRUE;
1183 }
1184 Password++;
1185 }
1186
1187 /* Set admin password */
1188 SetAdministratorPassword(Password1);
1189 break;
1190
1191 case PSN_WIZBACK:
1192 pSetupData->UnattendSetup = FALSE;
1193 break;
1194
1195 default:
1196 break;
1197 }
1198 }
1199 break;
1200
1201 default:
1202 break;
1203 }
1204
1205 return FALSE;
1206}
#define isprint(c)
Definition: acclib.h:73
wcscpy
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
#define IDS_REACTOS_SETUP
Definition: resource.h:129
static const WCHAR Title[]
Definition: oid.c:1259
#define IDC_COMPUTERNAME
Definition: resource.h:15
NTSTATUS SetAdministratorPassword(LPCWSTR Password)
Definition: security.c:1609
#define IDC_ADMINPASSWORD2
Definition: resource.h:52
#define IDS_WZD_COMPUTERNAME
Definition: resource.h:145
#define IDS_WZD_PASSWORDMATCH
Definition: resource.h:147
#define IDS_WZD_PASSWORDCHAR
Definition: resource.h:148
#define IDD_THEMEPAGE
Definition: resource.h:82
#define IDS_WZD_PASSWORDEMPTY
Definition: resource.h:146
#define IDC_ADMINPASSWORD1
Definition: resource.h:51
#define PSN_WIZNEXT
Definition: prsht.h:121
_Check_return_ _CRTIMP int __cdecl wcscmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
WCHAR ComputerName[MAX_COMPUTERNAME_LENGTH+1]
Definition: syssetup.h:44
WCHAR AdminPassword[128]
Definition: syssetup.h:45
static BOOL WriteDefaultLogonData(LPWSTR Domain)
Definition: wizard.c:974
static void GenerateComputerName(LPWSTR lpBuffer)
Definition: wizard.c:1026
static BOOL WriteComputerSettings(WCHAR *ComputerName, HWND hwndDlg)
Definition: wizard.c:903
@ Password
Definition: telnetd.h:65
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
Definition: dialog.c:2263
#define MAX_COMPUTERNAME_LENGTH
Definition: winbase.h:269
LONG_PTR LPARAM
Definition: windef.h:208
#define EM_LIMITTEXT
Definition: winuser.h:2011
#define GetDlgItemText
Definition: winuser.h:5805
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
#define MB_ICONERROR
Definition: winuser.h:798
#define WM_SETTEXT
Definition: winuser.h:1628
HWND WINAPI SetFocus(_In_opt_ HWND)
#define SendMessage
Definition: winuser.h:5863
#define MB_OK
Definition: winuser.h:801
#define SendDlgItemMessage
Definition: winuser.h:5862

Referenced by InstallWizard().

◆ Control_RunDLLW()

void WINAPI Control_RunDLLW ( HWND  hWnd,
HINSTANCE  hInst,
LPCWSTR  cmd,
DWORD  nCmdShow 
)

Definition at line 1173 of file control.c.

1174{
1175 CPanel panel;
1176
1177 TRACE("(%p, %p, %s, 0x%08x)\n",
1178 hWnd, hInst, debugstr_w(cmd), nCmdShow);
1179
1180#ifndef __REACTOS__
1181 memset(&panel, 0, sizeof(panel));
1182 list_init( &panel.applets );
1183#endif
1184
1185 if (!cmd || !*cmd) {
1186 Control_DoWindow(&panel, hWnd, hInst);
1187 } else {
1188 Control_DoLaunch(&panel, hWnd, cmd);
1189 }
1190}
static void list_init(struct list_entry *head)
Definition: list.h:51
static void Control_DoWindow(CPanel *panel, HWND hWnd, HINSTANCE hInst)
Definition: control.c:703
static void Control_DoLaunch(CPanel *panel, HWND hWnd, LPCWSTR wszCmd)
Definition: control.c:867
HINSTANCE hInst
Definition: dxdiag.c:13
#define debugstr_w
Definition: kernel32.h:32
#define memset(x, y, z)
Definition: compat.h:39
#define TRACE(s)
Definition: solgame.cpp:4
Definition: cpanel.h:56
struct list applets
Definition: cpanel.h:57
Definition: ftp_var.h:139

Referenced by FinishDlgProc().

◆ CreateBoldFont()

static HFONT CreateBoldFont ( VOID  )
static

Definition at line 101 of file wizard.c.

102{
103 LOGFONTW tmpFont = {0};
104 HFONT hBoldFont;
105 HDC hDc;
106
107 /* Grabs the Drawing Context */
108 hDc = GetDC(NULL);
109
110 tmpFont.lfHeight = -MulDiv(8, GetDeviceCaps(hDc, LOGPIXELSY), 72);
111 tmpFont.lfWeight = FW_BOLD;
112 wcscpy(tmpFont.lfFaceName, L"MS Shell Dlg");
113
114 hBoldFont = CreateFontIndirectW(&tmpFont);
115
116 ReleaseDC(NULL, hDc);
117
118 return hBoldFont;
119}
static HDC
Definition: imagelist.c:88
static DWORD *static HFONT(WINAPI *pCreateFontIndirectExA)(const ENUMLOGFONTEXDVA *)
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
Definition: muldiv.c:25
LONG lfHeight
Definition: dimm.idl:59
LONG lfWeight
Definition: dimm.idl:63
WCHAR lfFaceName[LF_FACESIZE]
Definition: dimm.idl:72
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
#define FW_BOLD
Definition: wingdi.h:378
#define LOGPIXELSY
Definition: wingdi.h:719
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HDC WINAPI GetDC(_In_opt_ HWND)

Referenced by InstallWizard().

◆ CreateTimeZoneList()

static VOID CreateTimeZoneList ( PSETUPDATA  SetupData)
static

Definition at line 1658 of file wizard.c.

1659{
1661}
SETUPDATA SetupData
Definition: reactos.c:41
static LONG RetrieveTimeZone(IN HKEY hZoneKey, IN PVOID Context)
Definition: wizard.c:1577
VOID EnumerateTimeZoneList(IN PENUM_TIMEZONE_CALLBACK Callback, IN PVOID Context OPTIONAL)
Definition: tzlib.c:223

Referenced by DateTimePageDlgProc().

◆ CreateTitleFont()

static HFONT CreateTitleFont ( VOID  )
static

Definition at line 80 of file wizard.c.

81{
82 LOGFONTW LogFont = {0};
83 HDC hdc;
85
86 LogFont.lfWeight = FW_BOLD;
87 wcscpy(LogFont.lfFaceName, L"MS Shell Dlg");
88
89 hdc = GetDC(NULL);
90 LogFont.lfHeight = -MulDiv(12, GetDeviceCaps(hdc, LOGPIXELSY), 72);
91
92 hFont = CreateFontIndirectW(&LogFont);
93
95
96 return hFont;
97}
HFONT hFont
Definition: main.c:53
HDC hdc
Definition: main.c:9

◆ DateTimePageDlgProc()

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

Definition at line 1844 of file wizard.c.

1848{
1850
1851 /* Retrieve pointer to the global setup data */
1853
1854 switch (uMsg)
1855 {
1856 case WM_INITDIALOG:
1857 {
1858 /* Save pointer to the global setup data */
1861
1863
1865 {
1868
1870 {
1872 }
1873 }
1874 else
1875 {
1877 SetupData, -1);
1878
1880 }
1881 break;
1882 }
1883
1884 case WM_TIMER:
1885 {
1886 SYSTEMTIME LocalTime;
1887
1888 GetLocalTime(&LocalTime);
1889 UpdateLocalSystemTime(hwndDlg, LocalTime);
1890
1891 // Reset timeout.
1892 SetTimer(hwndDlg, 1, 1000 - LocalTime.wMilliseconds, NULL);
1893 break;
1894 }
1895
1896 case WM_NOTIFY:
1897 switch (((LPNMHDR)lParam)->code)
1898 {
1899 case PSN_SETACTIVE:
1900 {
1901 SYSTEMTIME LocalTime;
1902
1903 GetLocalTime(&LocalTime);
1904 UpdateLocalSystemTime(hwndDlg, LocalTime);
1905
1906 /* Enable the Back and Next buttons */
1908
1910 {
1912 return TRUE;
1913 }
1914
1915 SetTimer(hwndDlg, 1, 1000 - LocalTime.wMilliseconds, NULL);
1916 break;
1917 }
1918
1919 case PSN_KILLACTIVE:
1920 case DTN_DATETIMECHANGE:
1921 // NB: Not re-set until changing page (PSN_SETACTIVE).
1922 KillTimer(hwndDlg, 1);
1923 break;
1924
1925 case PSN_WIZNEXT:
1927 break;
1928
1929 case PSN_WIZBACK:
1931 break;
1932
1933 default:
1934 break;
1935 }
1936 break;
1937
1938 case WM_DESTROY:
1940 break;
1941
1942 default:
1943 break;
1944 }
1945
1946 return FALSE;
1947}
#define IDC_TIMEZONELIST
Definition: resource.h:16
#define IDC_AUTODAYLIGHT
Definition: resource.h:17
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:286
#define PSN_KILLACTIVE
Definition: prsht.h:116
#define DTN_DATETIMECHANGE
Definition: commctrl.h:4371
DWORD TimeZoneIndex
Definition: syssetup.h:52
UINT uFirstNetworkWizardPage
Definition: syssetup.h:58
DWORD DisableAutoDaylightTimeSet
Definition: syssetup.h:53
WORD wMilliseconds
Definition: winbase.h:943
Definition: inflate.c:139
static VOID CreateTimeZoneList(PSETUPDATA SetupData)
Definition: wizard.c:1658
static VOID UpdateLocalSystemTime(HWND hwnd, SYSTEMTIME LocalTime)
Definition: wizard.c:1805
static BOOL WriteDateTimeSettings(HWND hwndDlg, PSETUPDATA SetupData)
Definition: wizard.c:1813
static VOID DestroyTimeZoneList(PSETUPDATA SetupData)
Definition: wizard.c:1664
static VOID ShowTimeZoneList(HWND hwnd, PSETUPDATA SetupData, DWORD dwEntryIndex)
Definition: wizard.c:1686
#define GWLP_USERDATA
Definition: treelist.c:63
uint32_t DWORD_PTR
Definition: typedefs.h:65
UINT_PTR WPARAM
Definition: windef.h:207
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define BM_SETCHECK
Definition: winuser.h:1932
#define WM_TIMER
Definition: winuser.h:1753
#define WM_DESTROY
Definition: winuser.h:1620
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define BST_CHECKED
Definition: winuser.h:197

Referenced by InstallWizard().

◆ DestroyTimeZoneList()

static VOID DestroyTimeZoneList ( PSETUPDATA  SetupData)
static

Definition at line 1664 of file wizard.c.

1665{
1667
1668 while (SetupData->TimeZoneListHead != NULL)
1669 {
1671
1674 {
1676 }
1677
1679 }
1680
1682}
base of all file and directory entries
Definition: entries.h:83
struct _TIMEZONE_ENTRY * TimeZoneListHead
Definition: syssetup.h:50
struct _TIMEZONE_ENTRY * TimeZoneListTail
Definition: syssetup.h:51
Definition: timezone.c:16

Referenced by DateTimePageDlgProc().

◆ DoWriteProductOption()

static BOOL DoWriteProductOption ( PRODUCT_OPTION  nOption)
static

Definition at line 523 of file wizard.c.

524{
525 HKEY hKey;
526 LONG error;
527 LPCWSTR pszData;
528 DWORD dwValue, cbData;
530 ASSERT(0 <= nOption && nOption < _countof(s_ProductOptionData));
531
532 /* open ProductOptions key */
534 if (error)
535 {
536 DPRINT1("RegOpenKeyExW failed\n");
537 goto Error;
538 }
539
540 /* write ProductSuite */
541 pszData = pData->ProductSuite;
542 cbData = (lstrlenW(pszData) + 2) * sizeof(WCHAR);
543 error = RegSetValueExW(hKey, L"ProductSuite", 0, REG_MULTI_SZ, (const BYTE *)pszData, cbData);
544 if (error)
545 {
546 DPRINT1("RegSetValueExW failed\n");
547 goto Error;
548 }
549
550 /* write ProductType */
551 pszData = pData->ProductType;
552 cbData = (lstrlenW(pszData) + 1) * sizeof(WCHAR);
553 error = RegSetValueExW(hKey, L"ProductType", 0, REG_SZ, (const BYTE *)pszData, cbData);
554 if (error)
555 {
556 DPRINT1("RegSetValueExW failed\n");
557 goto Error;
558 }
559
561
562 /* open ReactOS version key */
564 if (error)
565 {
566 DPRINT1("RegOpenKeyExW failed\n");
567 goto Error;
568 }
569
570 /* write ReportAsWorkstation */
571 dwValue = pData->ReportAsWorkstation;
572 cbData = sizeof(dwValue);
573 error = RegSetValueExW(hKey, L"ReportAsWorkstation", 0, REG_DWORD, (const BYTE *)&dwValue, cbData);
574 if (error)
575 {
576 DPRINT1("RegSetValueExW failed\n");
577 goto Error;
578 }
579
581
582 /* open Control Windows key */
584 if (error)
585 {
586 DPRINT1("RegOpenKeyExW failed\n");
587 goto Error;
588 }
589
590 /* write Control Windows CSDVersion */
591 dwValue = pData->CSDVersion;
592 cbData = sizeof(dwValue);
593 error = RegSetValueExW(hKey, L"CSDVersion", 0, REG_DWORD, (const BYTE *)&dwValue, cbData);
594 if (error)
595 {
596 DPRINT1("RegSetValueExW failed\n");
597 goto Error;
598 }
599
601
602 /* open Winlogon key */
604 if (error)
605 {
606 DPRINT1("RegOpenKeyExW failed\n");
607 goto Error;
608 }
609
610 /* write LogonType */
611 dwValue = pData->LogonType;
612 cbData = sizeof(dwValue);
613 error = RegSetValueExW(hKey, L"LogonType", 0, REG_DWORD, (const BYTE *)&dwValue, cbData);
614 if (error)
615 {
616 DPRINT1("RegSetValueExW failed\n");
617 goto Error;
618 }
619
620 if (nOption == PRODUCT_OPTION_WORKSTATION)
621 {
622 /* Write system sound events values for Workstation */
625 }
626
627Error:
628 if (hKey)
630
631 return error == ERROR_SUCCESS;
632}
#define DPRINT1
Definition: precomp.h:8
BOOL Error
Definition: chkdsk.c:66
#define RegCloseKey(hKey)
Definition: registry.h:49
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
Definition: reg.c:3333
#define lstrlenW
Definition: compat.h:750
#define REG_SZ
Definition: layer.c:22
#define error(str)
Definition: mkdosfs.c:1605
#define ASSERT(a)
Definition: mode.c:44
#define KEY_WRITE
Definition: nt_native.h:1031
#define REG_DWORD
Definition: sdbapi.c:596
#define _countof(array)
Definition: sndvol32.h:70
static const WCHAR * s_ExplorerSoundEvents[][2]
Definition: wizard.c:433
static const PRODUCT_OPTION_DATA s_ProductOptionData[]
Definition: wizard.c:397
static BOOL DoWriteSoundEvents(HKEY hKey, LPCWSTR lpSubkey, LPCWSTR lpEventsArray[][2], DWORD dwSize)
Definition: wizard.c:440
static const WCHAR s_szRosVersion[]
Definition: wizard.c:382
static const WCHAR s_szWinlogon[]
Definition: wizard.c:384
static const WCHAR * s_DefaultSoundEvents[][2]
Definition: wizard.c:403
static const WCHAR s_szExplorerSoundEvents[]
Definition: wizard.c:386
static const WCHAR s_szProductOptions[]
Definition: wizard.c:381
static const WCHAR s_szControlWindows[]
Definition: wizard.c:383
static const WCHAR s_szDefaultSoundEvents[]
Definition: wizard.c:385
@ PRODUCT_OPTION_WORKSTATION
Definition: syssetup.h:29
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1830
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
#define HKEY_CURRENT_USER
Definition: winreg.h:11
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
unsigned char BYTE
Definition: xxhash.c:193

Referenced by ProductPageDlgProc().

◆ DoWriteSoundEvents()

static BOOL DoWriteSoundEvents ( HKEY  hKey,
LPCWSTR  lpSubkey,
LPCWSTR  lpEventsArray[][2],
DWORD  dwSize 
)
static

Definition at line 440 of file wizard.c.

444{
445 HKEY hRootKey, hEventKey, hDefaultKey;
446 LONG error;
447 ULONG i;
448 WCHAR szDest[MAX_PATH];
449 DWORD dwAttribs;
450 DWORD cbData;
451
452 /* Open the sound events key */
453 error = RegOpenKeyExW(hKey, lpSubkey, 0, KEY_READ, &hRootKey);
454 if (error)
455 {
456 DPRINT1("RegOpenKeyExW failed\n");
457 goto Error;
458 }
459
460 /* Set each sound event */
461 for (i = 0; i < dwSize; i++)
462 {
463 /*
464 * Verify that the sound file exists and is an actual file.
465 */
466
467 /* Expand the sound file path */
468 if (!ExpandEnvironmentStringsW(lpEventsArray[i][1], szDest, _countof(szDest)))
469 {
470 /* Failed to expand, continue with the next sound event */
471 continue;
472 }
473
474 /* Check if the sound file exists and isn't a directory */
475 dwAttribs = GetFileAttributesW(szDest);
476 if ((dwAttribs == INVALID_FILE_ATTRIBUTES) ||
477 (dwAttribs & FILE_ATTRIBUTE_DIRECTORY))
478 {
479 /* It does not, just continue with the next sound event */
480 continue;
481 }
482
483 /*
484 * Create the sound event entry.
485 */
486
487 /* Open the sound event subkey */
488 error = RegOpenKeyExW(hRootKey, lpEventsArray[i][0], 0, KEY_READ, &hEventKey);
489 if (error)
490 {
491 /* Failed to open, continue with next sound event */
492 continue;
493 }
494
495 /* Open .Default subkey */
496 error = RegOpenKeyExW(hEventKey, L".Default", 0, KEY_WRITE, &hDefaultKey);
497 RegCloseKey(hEventKey);
498 if (error)
499 {
500 /* Failed to open, continue with next sound event */
501 continue;
502 }
503
504 /* Associate the sound file to this sound event */
505 cbData = (lstrlenW(lpEventsArray[i][1]) + 1) * sizeof(WCHAR);
506 error = RegSetValueExW(hDefaultKey, NULL, 0, REG_EXPAND_SZ, (const BYTE *)lpEventsArray[i][1], cbData);
507 RegCloseKey(hDefaultKey);
508 if (error)
509 {
510 /* Failed to set the value, continue with next sound event */
511 continue;
512 }
513 }
514
515Error:
516 if (hRootKey)
517 RegCloseKey(hRootKey);
518
519 return error == ERROR_SUCCESS;
520}
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
Definition: environ.c:519
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
Definition: fileinfo.c:652
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
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:56
#define KEY_READ
Definition: nt_native.h:1023
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
#define REG_EXPAND_SZ
Definition: nt_native.h:1494
uint32_t ULONG
Definition: typedefs.h:59
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23

Referenced by DoWriteProductOption().

◆ EnableVisualTheme()

VOID EnableVisualTheme ( _In_opt_ HWND  hwndParent,
_In_opt_ PCWSTR  ThemeFile 
)

Definition at line 1371 of file wizard.c.

1374{
1375 enum { THEME_FILE, STYLE_FILE, UNKNOWN } fType;
1376 WCHAR szPath[MAX_PATH]; // Expanded path of the file to use.
1377 WCHAR szStyleFile[MAX_PATH];
1378
1379 fType = THEME_FILE; // Default to Classic theme.
1380 if (ThemeFile)
1381 {
1382 /* Expand the path if possible */
1383 if (ExpandEnvironmentStringsW(ThemeFile, szPath, _countof(szPath)) != 0)
1384 ThemeFile = szPath;
1385
1386 /* Determine the file type from its extension */
1387 fType = UNKNOWN; {
1388 PCWSTR pszExt = wcsrchr(ThemeFile, L'.'); // PathFindExtensionW(ThemeFile);
1389 if (pszExt)
1390 {
1391 if (_wcsicmp(pszExt, L".theme") == 0)
1392 fType = THEME_FILE;
1393 else if (_wcsicmp(pszExt, L".msstyles") == 0)
1394 fType = STYLE_FILE;
1395 } }
1396 if (fType == UNKNOWN)
1397 {
1398 DPRINT1("EnableVisualTheme(): Unknown file '%S'\n", ThemeFile);
1399 return;
1400 }
1401 }
1402
1403 DPRINT1("Applying visual %s '%S'\n",
1404 (fType == THEME_FILE) ? "theme" : "style",
1405 ThemeFile ? ThemeFile : L"(Classic)");
1406
1407//
1408// TODO: Use instead uxtheme!SetSystemVisualStyle() once it is implemented,
1409// https://stackoverflow.com/a/1036903
1410// https://pinvoke.net/default.aspx/uxtheme.SetSystemVisualStyle
1411// or ApplyTheme(NULL, 0, NULL) for restoring the classic theme.
1412//
1413// NOTE: The '/Action:ActivateMSTheme' is ReactOS-specific.
1414//
1415
1416 if (ThemeFile && (fType == THEME_FILE))
1417 {
1418 /* Retrieve the visual style specified in the theme file.
1419 * If none, fall back to the classic theme. */
1420 if (GetPrivateProfileStringW(L"VisualStyles", L"Path", NULL,
1421 szStyleFile, _countof(szStyleFile), ThemeFile) && *szStyleFile)
1422 {
1423 /* Expand the path if possible */
1424 ThemeFile = szStyleFile;
1425 if (ExpandEnvironmentStringsW(ThemeFile, szPath, _countof(szPath)) != 0)
1426 ThemeFile = szPath;
1427 }
1428 else
1429 {
1430 ThemeFile = NULL;
1431 }
1432
1433 DPRINT1("--> Applying visual style '%S'\n",
1434 ThemeFile ? ThemeFile : L"(Classic)");
1435 }
1436
1437 if (ThemeFile)
1438 {
1439 WCHAR wszParams[1024];
1440 // FIXME: L"desk.cpl desk,@Appearance" regression, see commit 50d260a7f0
1441 PCWSTR format = L"desk.cpl,,2 /Action:ActivateMSTheme /file:\"%s\"";
1442
1443 StringCchPrintfW(wszParams, _countof(wszParams), format, ThemeFile);
1445 }
1446 else
1447 {
1448 RunControlPanelApplet(hwndParent, L"desk.cpl,,2 /Action:ActivateMSTheme");
1449 }
1450}
static HWND hwndParent
Definition: cryptui.c:300
#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
void * UNKNOWN
Definition: ks.h:2676
LPCWSTR szPath
Definition: env.c:37
_Check_return_ _CRTIMP int __cdecl _wcsicmp(_In_z_ const wchar_t *_Str1, _In_z_ const wchar_t *_Str2)
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:1309
const uint16_t * PCWSTR
Definition: typedefs.h:57
struct _THEME_FILE THEME_FILE

Referenced by PreprocessUnattend(), and ThemePageDlgProc().

◆ FinishDlgProc()

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

Definition at line 2561 of file wizard.c.

2565{
2566
2567 switch (uMsg)
2568 {
2569 case WM_INITDIALOG:
2570 {
2571 /* Get pointer to the global setup data */
2573
2575 {
2576 /* Run the Wine Gecko prompt */
2577 Control_RunDLLW(hwndDlg, 0, L"appwiz.cpl,,install_gecko", SW_SHOW);
2578 }
2579
2580 /* Set title font */
2581 SendDlgItemMessage(hwndDlg,
2583 WM_SETFONT,
2585 (LPARAM)TRUE);
2587 {
2588 KillTimer(hwndDlg, 1);
2590 PostQuitMessage(0);
2591 }
2592 }
2593 break;
2594
2595 case WM_DESTROY:
2596 {
2598 PostQuitMessage(0);
2599 return TRUE;
2600 }
2601
2602 case WM_TIMER:
2603 {
2604 INT Position;
2605 HWND hWndProgress;
2606
2607 hWndProgress = GetDlgItem(hwndDlg, IDC_RESTART_PROGRESS);
2608 Position = SendMessage(hWndProgress, PBM_GETPOS, 0, 0);
2609 if (Position == 300)
2610 {
2611 KillTimer(hwndDlg, 1);
2613 }
2614 else
2615 {
2616 SendMessage(hWndProgress, PBM_SETPOS, Position + 1, 0);
2617 }
2618 }
2619 return TRUE;
2620
2621 case WM_NOTIFY:
2622 {
2623 LPNMHDR lpnm = (LPNMHDR)lParam;
2624
2625 switch (lpnm->code)
2626 {
2627 case PSN_SETACTIVE:
2628 /* Enable the correct buttons on for the active page */
2630
2632 MAKELPARAM(0, 300));
2634 SetTimer(hwndDlg, 1, 50, NULL);
2635 break;
2636
2637 case PSN_WIZFINISH:
2638 DestroyWindow(GetParent(hwndDlg));
2639 break;
2640
2641 default:
2642 break;
2643 }
2644 }
2645 break;
2646
2647 default:
2648 break;
2649 }
2650
2651 return FALSE;
2652}
#define IDC_FINISHTITLE
Definition: resource.h:66
#define IDC_RESTART_PROGRESS
Definition: resource.h:67
#define PropSheet_PressButton(d, i)
Definition: prsht.h:348
#define PSWIZB_FINISH
Definition: prsht.h:155
#define PSBTN_FINISH
Definition: prsht.h:148
#define PSN_WIZFINISH
Definition: prsht.h:122
#define PBM_GETPOS
Definition: commctrl.h:2199
#define PBM_SETPOS
Definition: commctrl.h:2189
#define PBM_SETRANGE
Definition: commctrl.h:2188
BOOL DisableGeckoInst
Definition: syssetup.h:47
HFONT hTitleFont
Definition: reactos.h:139
static COORD Position
Definition: mouse.c:34
void WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow)
Definition: control.c:1173
static VOID SetInstallationCompleted(VOID)
Definition: wizard.c:2532
#define MAKELPARAM(l, h)
Definition: winuser.h:4019
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define WM_SETFONT
Definition: winuser.h:1661
#define SW_SHOW
Definition: winuser.h:786
BOOL WINAPI DestroyWindow(_In_ HWND)

◆ GenerateComputerName()

static void GenerateComputerName ( LPWSTR  lpBuffer)
static

Definition at line 1026 of file wizard.c.

1027{
1028 static const WCHAR Chars[] = L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
1029 static const unsigned cChars = sizeof(Chars) / sizeof(WCHAR) - 1;
1030 unsigned i;
1031
1032 wcscpy(lpBuffer, L"REACTOS-");
1033
1035
1036 /* fill in 7 characters */
1037 for (i = 8; i < 15; i++)
1038 lpBuffer[i] = Chars[rand() % cChars];
1039
1040 lpBuffer[15] = UNICODE_NULL; /* NULL-terminate */
1041}
static TAGREF LPCWSTR LPDWORD LPVOID lpBuffer
Definition: db.cpp:175
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
void __cdecl srand(_In_ unsigned int _Seed)
_Check_return_ int __cdecl rand(void)
Definition: rand.c:10
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int cChars
Definition: usp10.c:64

Referenced by ComputerPageDlgProc().

◆ GetInstallSourceWin32()

static BOOL GetInstallSourceWin32 ( OUT PWSTR  pwszPath,
IN DWORD  cchPathMax,
IN PCWSTR  pwszNTPath 
)
static

Definition at line 2660 of file wizard.c.

2664{
2665 WCHAR wszDrives[512];
2666 WCHAR wszNTPath[512]; // MAX_PATH ?
2667 DWORD cchDrives;
2668 PWCHAR pwszDrive;
2669
2670 *pwszPath = UNICODE_NULL;
2671
2672 cchDrives = GetLogicalDriveStringsW(_countof(wszDrives) - 1, wszDrives);
2673 if (cchDrives == 0 || cchDrives >= _countof(wszDrives))
2674 {
2675 /* Buffer too small or failure */
2676 LogItem(NULL, L"GetLogicalDriveStringsW failed");
2677 return FALSE;
2678 }
2679
2680 for (pwszDrive = wszDrives; *pwszDrive; pwszDrive += wcslen(pwszDrive) + 1)
2681 {
2682 WCHAR wszBuf[MAX_PATH];
2683
2684 /* Retrieve the NT path corresponding to the current Win32 DOS path */
2685 pwszDrive[2] = UNICODE_NULL; // Temporarily remove the backslash
2686 QueryDosDeviceW(pwszDrive, wszNTPath, _countof(wszNTPath));
2687 pwszDrive[2] = L'\\'; // Restore the backslash
2688
2689 wcscat(wszNTPath, L"\\"); // Concat a backslash
2690
2691 /* Logging */
2692 wsprintf(wszBuf, L"Testing '%s' --> '%s' %s a CD",
2693 pwszDrive, wszNTPath,
2694 (GetDriveTypeW(pwszDrive) == DRIVE_CDROM) ? L"is" : L"is not");
2695 LogItem(NULL, wszBuf);
2696
2697 /* Check whether the NT path corresponds to the NT installation source path */
2698 if (!_wcsicmp(wszNTPath, pwszNTPath))
2699 {
2700 /* Found it! */
2701 wcscpy(pwszPath, pwszDrive); // cchPathMax
2702
2703 /* Logging */
2704 wsprintf(wszBuf, L"GetInstallSourceWin32: %s", pwszPath);
2705 LogItem(NULL, wszBuf);
2706 wcscat(wszBuf, L"\n");
2707 OutputDebugStringW(wszBuf);
2708
2709 return TRUE;
2710 }
2711 }
2712
2713 return FALSE;
2714}
wcscat
DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName, LPWSTR lpTargetPath, DWORD ucchMax)
Definition: dosdev.c:542
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
Definition: disk.c:497
DWORD WINAPI GetLogicalDriveStringsW(IN DWORD nBufferLength, IN LPWSTR lpBuffer)
Definition: disk.c:73
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
Definition: ignoredbgout.c:23
#define DRIVE_CDROM
Definition: machpc98.h:119
#define LogItem(lpTag, lpMessageText...)
Definition: syssetup.h:98
#define wsprintf
Definition: winuser.h:5885

Referenced by ProcessSetupInf().

◆ GetLargerTimeZoneEntry()

static PTIMEZONE_ENTRY GetLargerTimeZoneEntry ( PSETUPDATA  SetupData,
DWORD  Index 
)
static

Definition at line 1560 of file wizard.c.

1561{
1563
1565 while (Entry != NULL)
1566 {
1567 if (Entry->Index >= Index)
1568 return Entry;
1569
1570 Entry = Entry->Next;
1571 }
1572
1573 return NULL;
1574}
_In_ WDFCOLLECTION _In_ ULONG Index

Referenced by RetrieveTimeZone().

◆ GetLocalSystemTime()

static BOOL GetLocalSystemTime ( HWND  hwnd,
PSETUPDATA  SetupData 
)
static

Definition at line 1761 of file wizard.c.

1762{
1763 SYSTEMTIME Date;
1765
1767 {
1768 return FALSE;
1769 }
1770
1772 {
1773 return FALSE;
1774 }
1775
1779 SetupData->SystemTime.wDay = Date.wDay;
1780 SetupData->SystemTime.wHour = Time.wHour;
1781 SetupData->SystemTime.wMinute = Time.wMinute;
1782 SetupData->SystemTime.wSecond = Time.wSecond;
1783 SetupData->SystemTime.wMilliseconds = Time.wMilliseconds;
1784
1785 return TRUE;
1786}
#define IDC_TIMEPICKER
Definition: resource.h:11
#define IDC_DATEPICKER
Definition: resource.h:61
static PLARGE_INTEGER Time
Definition: time.c:105
#define GDT_VALID
Definition: commctrl.h:4465
#define DateTime_GetSystemtime(hdp, pst)
Definition: commctrl.h:4335
SYSTEMTIME SystemTime
Definition: syssetup.h:49
WORD wYear
Definition: winbase.h:936
WORD wMonth
Definition: winbase.h:937
WORD wHour
Definition: winbase.h:940
WORD wSecond
Definition: winbase.h:942
WORD wMinute
Definition: winbase.h:941
WORD wDay
Definition: winbase.h:939
WORD wDayOfWeek
Definition: winbase.h:938
_In_ LONG _In_ HWND hwnd
Definition: winddi.h:4023

Referenced by WriteDateTimeSettings().

◆ GplDlgProc()

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

Definition at line 122 of file wizard.c.

126{
127 HRSRC GplTextResource;
128 HGLOBAL GplTextMem;
129 PVOID GplTextLocked;
130 PCHAR GplText;
131 DWORD Size;
132
133
134 switch (uMsg)
135 {
136 case WM_INITDIALOG:
137 GplTextResource = FindResourceW(hDllInstance, MAKEINTRESOURCE(IDR_GPL), L"RT_TEXT");
138 if (NULL == GplTextResource)
139 {
140 break;
141 }
142 Size = SizeofResource(hDllInstance, GplTextResource);
143 if (0 == Size)
144 {
145 break;
146 }
147 GplText = HeapAlloc(GetProcessHeap(), 0, Size + 1);
148 if (NULL == GplText)
149 {
150 break;
151 }
152 GplTextMem = LoadResource(hDllInstance, GplTextResource);
153 if (NULL == GplTextMem)
154 {
155 HeapFree(GetProcessHeap(), 0, GplText);
156 break;
157 }
158 GplTextLocked = LockResource(GplTextMem);
159 if (NULL == GplTextLocked)
160 {
161 HeapFree(GetProcessHeap(), 0, GplText);
162 break;
163 }
164 memcpy(GplText, GplTextLocked, Size);
165 GplText[Size] = '\0';
166 SendMessageA(GetDlgItem(hwndDlg, IDC_GPL_TEXT), WM_SETTEXT, 0, (LPARAM) GplText);
167 HeapFree(GetProcessHeap(), 0, GplText);
168 SetFocus(GetDlgItem(hwndDlg, IDOK));
169 return FALSE;
170
171 case WM_CLOSE:
172 EndDialog(hwndDlg, IDCANCEL);
173 break;
174
175 case WM_COMMAND:
176 if (HIWORD(wParam) == BN_CLICKED && IDOK == LOWORD(wParam))
177 {
178 EndDialog(hwndDlg, IDOK);
179 }
180 break;
181
182 default:
183 break;
184 }
185
186 return FALSE;
187}
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
Definition: res.c:176
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:568
LPVOID WINAPI LockResource(HGLOBAL handle)
Definition: res.c:550
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
Definition: res.c:532
#define IDR_GPL
Definition: resource.h:174
#define IDC_GPL_TEXT
Definition: resource.h:86
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
char * PCHAR
Definition: typedefs.h:51
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
Definition: wdfdevice.h:4533
#define WM_CLOSE
Definition: winuser.h:1632
#define IDCANCEL
Definition: winuser.h:842
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDOK
Definition: winuser.h:841
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)

Referenced by AckPageDlgProc().

◆ InstallWizard()

VOID InstallWizard ( VOID  )

Definition at line 3244 of file wizard.c.

3245{
3246 PROPSHEETHEADER psh = {0};
3247 HPROPSHEETPAGE *phpage = NULL;
3248 PROPSHEETPAGE psp = {0};
3249 UINT nPages = 0;
3250 HWND hWnd;
3251 MSG msg;
3252 PSETUPDATA pSetupData = NULL;
3253 HMODULE hNetShell = NULL;
3255 DWORD dwPageCount = 10, dwNetworkPageCount = 0;
3256
3257 LogItem(L"BEGIN_SECTION", L"InstallWizard");
3258
3259 /* Allocate setup data */
3260 pSetupData = HeapAlloc(GetProcessHeap(),
3262 sizeof(SETUPDATA));
3263 if (pSetupData == NULL)
3264 {
3265 LogItem(NULL, L"SetupData allocation failed!");
3267 L"Setup failed to allocate global data!",
3268 L"ReactOS Setup",
3270 goto done;
3271 }
3273
3274 hNetShell = LoadLibraryW(L"netshell.dll");
3275 if (hNetShell != NULL)
3276 {
3277 DPRINT("Netshell.dll loaded!\n");
3278
3279 pfn = (PFNREQUESTWIZARDPAGES)GetProcAddress(hNetShell,
3280 "NetSetupRequestWizardPages");
3281 if (pfn != NULL)
3282 {
3283 pfn(&dwNetworkPageCount, NULL, NULL);
3284 dwPageCount += dwNetworkPageCount;
3285 }
3286 }
3287
3288 DPRINT("PageCount: %lu\n", dwPageCount);
3289
3290 phpage = HeapAlloc(GetProcessHeap(),
3292 dwPageCount * sizeof(HPROPSHEETPAGE));
3293 if (phpage == NULL)
3294 {
3295 LogItem(NULL, L"Page array allocation failed!");
3297 L"Setup failed to allocate page array!",
3298 L"ReactOS Setup",
3300 goto done;
3301 }
3302
3303 /* Process the $winnt$.inf setup file */
3304 ProcessSetupInf(pSetupData);
3305
3306 /* Create the Welcome page */
3307 psp.dwSize = sizeof(PROPSHEETPAGE);
3308 psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
3309 psp.hInstance = hDllInstance;
3310 psp.lParam = (LPARAM)pSetupData;
3311 psp.pfnDlgProc = WelcomeDlgProc;
3312 psp.pszTemplate = MAKEINTRESOURCE(IDD_WELCOMEPAGE);
3313 phpage[nPages++] = CreatePropertySheetPage(&psp);
3314
3315 /* Create the Acknowledgements page */
3316 psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3317 psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_ACKTITLE);
3318 psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_ACKSUBTITLE);
3319 psp.pszTemplate = MAKEINTRESOURCE(IDD_ACKPAGE);
3320 psp.pfnDlgProc = AckPageDlgProc;
3321 phpage[nPages++] = CreatePropertySheetPage(&psp);
3322
3323 /* Create the Product page */
3324 psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3325 psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_PRODUCTTITLE);
3326 psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_PRODUCTSUBTITLE);
3327 psp.pszTemplate = MAKEINTRESOURCE(IDD_PRODUCT);
3328 psp.pfnDlgProc = ProductPageDlgProc;
3329 phpage[nPages++] = CreatePropertySheetPage(&psp);
3330
3331 /* Create the Locale page */
3332 psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3333 psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_LOCALETITLE);
3334 psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_LOCALESUBTITLE);
3335 psp.pfnDlgProc = LocalePageDlgProc;
3336 psp.pszTemplate = MAKEINTRESOURCE(IDD_LOCALEPAGE);
3337 phpage[nPages++] = CreatePropertySheetPage(&psp);
3338
3339 /* Create the Owner page */
3340 psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3341 psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_OWNERTITLE);
3342 psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_OWNERSUBTITLE);
3343 psp.pszTemplate = MAKEINTRESOURCE(IDD_OWNERPAGE);
3344 psp.pfnDlgProc = OwnerPageDlgProc;
3345 phpage[nPages++] = CreatePropertySheetPage(&psp);
3346
3347 /* Create the Computer page */
3348 psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3349 psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_COMPUTERTITLE);
3350 psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_COMPUTERSUBTITLE);
3351 psp.pfnDlgProc = ComputerPageDlgProc;
3352 psp.pszTemplate = MAKEINTRESOURCE(IDD_COMPUTERPAGE);
3353 phpage[nPages++] = CreatePropertySheetPage(&psp);
3354
3355 /* Create the DateTime page */
3356 psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3357 psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_DATETIMETITLE);
3358 psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_DATETIMESUBTITLE);
3359 psp.pfnDlgProc = DateTimePageDlgProc;
3360 psp.pszTemplate = MAKEINTRESOURCE(IDD_DATETIMEPAGE);
3361 phpage[nPages++] = CreatePropertySheetPage(&psp);
3362
3363 /* Create the theme selection page */
3364 psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3365 psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_THEMESELECTIONTITLE);
3366 psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_THEMESELECTIONSUBTITLE);
3367 psp.pfnDlgProc = ThemePageDlgProc;
3368 psp.pszTemplate = MAKEINTRESOURCE(IDD_THEMEPAGE);
3369 phpage[nPages++] = CreatePropertySheetPage(&psp);
3370
3373
3374 if (pfn)
3375 {
3376 pfn(&dwNetworkPageCount, &phpage[nPages], pSetupData);
3377 nPages += dwNetworkPageCount;
3378 }
3379
3380 /* Create the Process page */
3381 psp.dwFlags = PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3382 psp.pszHeaderTitle = MAKEINTRESOURCE(IDS_PROCESSTITLE);
3383 psp.pszHeaderSubTitle = MAKEINTRESOURCE(IDS_PROCESSSUBTITLE);
3384 psp.pfnDlgProc = ProcessPageDlgProc;
3385 psp.pszTemplate = MAKEINTRESOURCE(IDD_PROCESSPAGE);
3386 phpage[nPages++] = CreatePropertySheetPage(&psp);
3387
3388 /* Create the Finish page */
3389 psp.dwFlags = PSP_DEFAULT | PSP_HIDEHEADER;
3390 psp.pfnDlgProc = FinishDlgProc;
3391 psp.pszTemplate = MAKEINTRESOURCE(IDD_FINISHPAGE);
3392 phpage[nPages++] = CreatePropertySheetPage(&psp);
3393
3394 ASSERT(nPages == dwPageCount);
3395
3396 /* Create the property sheet */
3397 psh.dwSize = sizeof(PROPSHEETHEADER);
3398 psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER | PSH_MODELESS;
3399 psh.hInstance = hDllInstance;
3400 psh.hwndParent = NULL;
3401 psh.nPages = nPages;
3402 psh.nStartPage = 0;
3403 psh.phpage = phpage;
3404 psh.pszbmWatermark = MAKEINTRESOURCE(IDB_WATERMARK);
3405 psh.pszbmHeader = MAKEINTRESOURCE(IDB_HEADER);
3406
3407 /* Create title font */
3408 pSetupData->hTitleFont = CreateTitleFont();
3409 pSetupData->hBoldFont = CreateBoldFont();
3410
3411 /* Display the wizard */
3412 hWnd = (HWND)PropertySheet(&psh);
3414
3415 while (GetMessage(&msg, NULL, 0, 0))
3416 {
3417 if (!IsDialogMessage(hWnd, &msg))
3418 {
3421 }
3422 }
3423
3424 DeleteObject(pSetupData->hBoldFont);
3425 DeleteObject(pSetupData->hTitleFont);
3426
3427 if (pSetupData->hSetupInf != INVALID_HANDLE_VALUE)
3428 SetupCloseInfFile(pSetupData->hSetupInf);
3429
3430done:
3431 if (phpage != NULL)
3432 HeapFree(GetProcessHeap(), 0, phpage);
3433
3434 if (hNetShell != NULL)
3435 FreeLibrary(hNetShell);
3436
3437 if (pSetupData != NULL)
3438 HeapFree(GetProcessHeap(), 0, pSetupData);
3439
3440 LogItem(L"END_SECTION", L"InstallWizard");
3441}
#define msg(x)
Definition: auth_time.c:54
#define IDB_HEADER
Definition: resource.h:30
#define IDS_PROCESSSUBTITLE
Definition: resource.h:98
#define IDS_PROCESSTITLE
Definition: resource.h:97
#define IDB_WATERMARK
Definition: resource.h:4
#define IDD_PROCESSPAGE
Definition: resource.h:60
#define IDD_LOCALEPAGE
Definition: resource.h:13
#define IDD_FINISHPAGE
Definition: resource.h:34
#define IDD_DATETIMEPAGE
Definition: resource.h:5
HANDLE HWND
Definition: compat.h:19
#define GetProcAddress(x, y)
Definition: compat.h:753
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#define FreeLibrary(x)
Definition: compat.h:748
#define LoadLibraryW(x)
Definition: compat.h:747
#define HEAP_ZERO_MEMORY
Definition: compat.h:134
#define IDD_WELCOMEPAGE
Definition: resource.h:21
#define IDS_THEMESELECTIONTITLE
Definition: resource.h:127
#define IDS_LOCALESUBTITLE
Definition: resource.h:117
#define IDD_ACKPAGE
Definition: resource.h:41
#define IDS_ACKTITLE
Definition: resource.h:107
#define IDS_PRODUCTTITLE
Definition: resource.h:166
#define IDD_OWNERPAGE
Definition: resource.h:45
#define IDS_OWNERSUBTITLE
Definition: resource.h:111
#define IDS_COMPUTERSUBTITLE
Definition: resource.h:114
#define IDS_DATETIMESUBTITLE
Definition: resource.h:122
#define IDS_LOCALETITLE
Definition: resource.h:116
#define IDS_THEMESELECTIONSUBTITLE
Definition: resource.h:128
#define IDS_COMPUTERTITLE
Definition: resource.h:113
#define IDD_COMPUTERPAGE
Definition: resource.h:49
#define IDS_OWNERTITLE
Definition: resource.h:110
#define IDS_ACKSUBTITLE
Definition: resource.h:108
#define IDS_PRODUCTSUBTITLE
Definition: resource.h:167
#define IDS_DATETIMETITLE
Definition: resource.h:121
pKey DeleteObject()
struct _PSP * HPROPSHEETPAGE
Definition: mstask.idl:90
unsigned int UINT
Definition: ndis.h:50
static HFONT CreateTitleFont(VOID)
Definition: wizard.c:1353
static INT_PTR CALLBACK WelcomeDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wizard.c:469
static INT_PTR CALLBACK FinishDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
Definition: wizard.c:1274
#define PROPSHEETHEADER
Definition: prsht.h:392
#define PSH_MODELESS
Definition: prsht.h:50
#define CreatePropertySheetPage
Definition: prsht.h:399
#define PSP_DEFAULT
Definition: prsht.h:22
#define PropertySheet
Definition: prsht.h:400
#define PROPSHEETPAGE
Definition: prsht.h:389
#define DPRINT
Definition: sndvol32.h:73
HFONT hBoldFont
Definition: reactos.h:140
PRODUCT_OPTION ProductOption
Definition: syssetup.h:61
UINT uPostNetworkWizardPage
Definition: syssetup.h:59
HINF hSetupInf
Definition: syssetup.h:56
static INT_PTR CALLBACK ComputerPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: wizard.c:1044
static INT_PTR CALLBACK LocalePageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: wizard.c:1475
static INT_PTR CALLBACK OwnerPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: wizard.c:794
static INT_PTR CALLBACK DateTimePageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: wizard.c:1844
static HFONT CreateBoldFont(VOID)
Definition: wizard.c:101
VOID ProcessSetupInf(IN OUT PSETUPDATA pSetupData)
Definition: wizard.c:3109
DWORD(WINAPI * PFNREQUESTWIZARDPAGES)(PDWORD, HPROPSHEETPAGE *, PSETUPDATA)
Definition: wizard.c:3241
static INT_PTR CALLBACK ThemePageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: wizard.c:1963
static INT_PTR CALLBACK AckPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: wizard.c:275
static INT_PTR CALLBACK ProcessPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: wizard.c:2436
static INT_PTR CALLBACK ProductPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
Definition: wizard.c:658
@ PRODUCT_OPTION_DEFAULT
Definition: syssetup.h:30
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1829
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
Definition: infsupp.c:45
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define IsDialogMessage
Definition: winuser.h:5829
#define GetMessage
Definition: winuser.h:5810
#define DispatchMessage
Definition: winuser.h:5785

Referenced by InstallReactOS().

◆ ItemCompletionThread()

static DWORD CALLBACK ItemCompletionThread ( LPVOID  Parameter)
static

Definition at line 2290 of file wizard.c.

2292{
2293 PITEMSDATA pItemsData;
2294 HWND hwndDlg;
2295
2296 pItemsData = (PITEMSDATA)Parameter;
2297 hwndDlg = pItemsData->hwndDlg;
2298
2299 /* Step 0 - Registering components */
2300 RegisterComponents(pItemsData);
2301
2302 /* Step 1 - Installing start menu items */
2303 InstallStartMenuItems(pItemsData);
2304
2305 /* FIXME: Add completion steps here! */
2306
2307 // FIXME: Move this call to a separate cleanup page!
2309
2310 /* Free the items data */
2311 HeapFree(GetProcessHeap(), 0, pItemsData);
2312
2313 /* Tell the wizard page that we are done */
2314 PostMessage(hwndDlg, PM_ITEMS_DONE, 0, 0);
2315
2316 return 0;
2317}
struct _ITEMSDATA * PITEMSDATA
#define PM_ITEMS_DONE
Definition: globals.h:64
VOID InstallStartMenuItems(_In_ PITEMSDATA pItemsData)
Definition: install.c:313
NTSTATUS NTAPI RtlCreateBootStatusDataFile(VOID)
Definition: bootdata.c:98
HWND hwndDlg
Definition: globals.h:31
static VOID RegisterComponents(PITEMSDATA pItemsData)
Definition: wizard.c:2241
#define PostMessage
Definition: winuser.h:5852
_Inout_opt_ PVOID Parameter
Definition: rtltypes.h:336

Referenced by RunItemCompletionThread().

◆ LocalePageDlgProc()

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

Definition at line 1475 of file wizard.c.

1479{
1481
1482 /* Retrieve pointer to the global setup data */
1484
1485 switch (uMsg)
1486 {
1487 case WM_INITDIALOG:
1488 {
1489 /* Save pointer to the global setup data */
1493
1496 }
1497 break;
1498
1499 case WM_COMMAND:
1500 if (HIWORD(wParam) == BN_CLICKED)
1501 {
1502 switch (LOWORD(wParam))
1503 {
1504 case IDC_CUSTOMLOCALE:
1505 RunControlPanelApplet(hwndDlg, L"intl.cpl,,5");
1507 break;
1508
1509 case IDC_CUSTOMLAYOUT:
1510 RunControlPanelApplet(hwndDlg, L"input.dll,@1");
1512 break;
1513 }
1514 }
1515 break;
1516
1517 case WM_NOTIFY:
1518 {
1519 LPNMHDR lpnm = (LPNMHDR)lParam;
1520
1521 switch (lpnm->code)
1522 {
1523 case PSN_SETACTIVE:
1524 /* Enable the Back and Next buttons */
1527 {
1528 // if (!*SetupData->SourcePath)
1529 {
1530 RunControlPanelApplet(hwndDlg, L"intl.cpl,,/f:\"$winnt$.inf\""); // Should be in System32
1531 }
1532
1534 return TRUE;
1535 }
1536 break;
1537
1538 case PSN_WIZNEXT:
1539 break;
1540
1541 case PSN_WIZBACK:
1543 break;
1544
1545 default:
1546 break;
1547 }
1548 }
1549 break;
1550
1551 default:
1552 break;
1553 }
1554
1555 return FALSE;
1556}
#define IDC_LOCALETEXT
Definition: resource.h:55
#define IDC_LAYOUTTEXT
Definition: resource.h:57
#define IDC_CUSTOMLOCALE
Definition: resource.h:56
#define IDC_CUSTOMLAYOUT
Definition: resource.h:58
static VOID SetKeyboardLayoutName(HWND hwnd)
Definition: wizard.c:1227
static VOID WriteUserLocale(VOID)
Definition: wizard.c:1454
static VOID SetUserLocaleName(HWND hwnd)
Definition: wizard.c:1210

Referenced by InstallWizard().

◆ OnChooseOption()

static void OnChooseOption ( HWND  hwndDlg,
PRODUCT_OPTION  nOption 
)
static

Definition at line 635 of file wizard.c.

636{
637 WCHAR szText[256];
638 ASSERT(0 <= nOption && nOption < _countof(s_ProductOptionData));
639
640 switch (nOption)
641 {
644 break;
645
648 break;
649
650 default:
651 return;
652 }
653
655}
#define IDC_PRODUCT_DESCRIPTION
Definition: resource.h:105
#define IDS_PRODUCTWORKSTATIONINFO
Definition: resource.h:171
#define IDS_PRODUCTSERVERINFO
Definition: resource.h:170
@ PRODUCT_OPTION_SERVER
Definition: syssetup.h:28

Referenced by ProductPageDlgProc().

◆ OwnerPageDlgProc()

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

Definition at line 794 of file wizard.c.

798{
799 WCHAR OwnerName[51];
800 WCHAR OwnerOrganization[51];
801 WCHAR Title[64];
802 WCHAR ErrorName[256];
803 LPNMHDR lpnm;
804 PSETUPDATA pSetupData;
805
806 pSetupData = (PSETUPDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
807
808 switch (uMsg)
809 {
810 case WM_INITDIALOG:
811 {
812 pSetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
813 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pSetupData);
814
815 /* set a localized ('Owner') placeholder string as default */
816 if (LoadStringW(hDllInstance, IDS_MACHINE_OWNER_NAME, OwnerName, _countof(OwnerName)))
817 {
818 SendDlgItemMessage(hwndDlg, IDC_OWNERNAME, WM_SETTEXT, 0, (LPARAM)OwnerName);
819 }
820
823
824 /* Set focus to owner name */
826
827 /* Select the default text to quickly overwrite it by typing */
829 }
830 break;
831
832
833 case WM_NOTIFY:
834 {
835 lpnm = (LPNMHDR)lParam;
836
837 switch (lpnm->code)
838 {
839 case PSN_SETACTIVE:
840 /* Enable the Back and Next buttons */
842 if (pSetupData->UnattendSetup)
843 {
844 SendMessage(GetDlgItem(hwndDlg, IDC_OWNERNAME), WM_SETTEXT, 0, (LPARAM)pSetupData->OwnerName);
846 if (WriteOwnerSettings(pSetupData->OwnerName, pSetupData->OwnerOrganization))
847 {
849 return TRUE;
850 }
851 }
852 break;
853
854 case PSN_WIZNEXT:
855 OwnerName[0] = 0;
856 if (GetDlgItemTextW(hwndDlg, IDC_OWNERNAME, OwnerName, 50) == 0)
857 {
859 {
860 wcscpy(Title, L"ReactOS Setup");
861 }
862 if (0 == LoadStringW(hDllInstance, IDS_WZD_NAME, ErrorName, ARRAYSIZE(ErrorName)))
863 {
864 wcscpy(ErrorName, L"Setup cannot continue until you enter your name.");
865 }
866 MessageBoxW(hwndDlg, ErrorName, Title, MB_ICONERROR | MB_OK);
867
869 SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1);
870
871 return TRUE;
872 }
873
874 OwnerOrganization[0] = 0;
875 GetDlgItemTextW(hwndDlg, IDC_OWNERORGANIZATION, OwnerOrganization, 50);
876
877 if (!WriteOwnerSettings(OwnerName, OwnerOrganization))
878 {
880 SetWindowLongPtr(hwndDlg, DWLP_MSGRESULT, -1);
881 return TRUE;
882 }
883
884 case PSN_WIZBACK:
885 pSetupData->UnattendSetup = FALSE;
886 break;
887
888 default:
889 break;
890 }
891 }
892 break;
893
894 default:
895 break;
896 }
897
898 return FALSE;
899}
#define IDC_OWNERORGANIZATION
Definition: resource.h:47
#define IDS_MACHINE_OWNER_NAME
Definition: resource.h:141
#define IDS_WZD_NAME
Definition: resource.h:143
#define IDC_OWNERNAME
Definition: resource.h:46
WCHAR OwnerName[51]
Definition: syssetup.h:42
WCHAR OwnerOrganization[51]
Definition: syssetup.h:43
static BOOL WriteOwnerSettings(WCHAR *OwnerName, WCHAR *OwnerOrganization)
Definition: wizard.c:752
#define EM_SETSEL
Definition: winuser.h:2029

Referenced by InstallWizard().

◆ PathIsEqual()

static BOOL PathIsEqual ( IN LPCWSTR  lpPath1,
IN LPCWSTR  lpPath2 
)
static

Definition at line 2992 of file wizard.c.

2995{
2996 WCHAR szPath1[MAX_PATH];
2997 WCHAR szPath2[MAX_PATH];
2998
2999 /* If something goes wrong, better return TRUE,
3000 * so the calling function returns early.
3001 */
3002 if (!PathCanonicalizeW(szPath1, lpPath1))
3003 return TRUE;
3004
3005 if (!PathAddBackslashW(szPath1))
3006 return TRUE;
3007
3008 if (!PathCanonicalizeW(szPath2, lpPath2))
3009 return TRUE;
3010
3011 if (!PathAddBackslashW(szPath2))
3012 return TRUE;
3013
3014 return (_wcsicmp(szPath1, szPath2) == 0);
3015}
#define PathCanonicalizeW
Definition: pathcch.h:313
#define PathAddBackslashW
Definition: pathcch.h:301

Referenced by AddInstallationSource().

◆ ProcessPageDlgProc()

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

Definition at line 2436 of file wizard.c.

2440{
2442 PREGISTRATIONNOTIFY RegistrationNotify;
2443
2444 /* Retrieve pointer to the global setup data */
2446
2447 switch (uMsg)
2448 {
2449 case WM_INITDIALOG:
2450 /* Save pointer to the global setup data */
2455 break;
2456
2457 case WM_NOTIFY:
2458 switch (((LPNMHDR)lParam)->code)
2459 {
2460 case PSN_SETACTIVE:
2461 LogItem(L"BEGIN", L"ProcessPage");
2462
2463 /* Disable the Back and Next buttons */
2465 RunItemCompletionThread(hwndDlg);
2466 break;
2467
2468 case PSN_WIZNEXT:
2469 LogItem(L"END", L"ProcessPage");
2470 break;
2471
2472 case PSN_WIZBACK:
2474 break;
2475
2476 default:
2477 break;
2478 }
2479 break;
2480
2481 case PM_ITEM_START:
2482 DPRINT("PM_ITEM_START %lu\n", (ULONG)lParam);
2486 break;
2487
2488 case PM_ITEM_END:
2489 DPRINT("PM_ITEM_END\n");
2490 if (lParam == ERROR_SUCCESS)
2491 {
2492 }
2493 else
2494 {
2495 ShowItemError(hwndDlg, (DWORD)lParam);
2496 }
2497 break;
2498
2499 case PM_STEP_START:
2500 DPRINT("PM_STEP_START\n");
2501 RegistrationNotify = (PREGISTRATIONNOTIFY)lParam;
2503 (LPARAM)((RegistrationNotify->CurrentItem != NULL)? RegistrationNotify->CurrentItem : L""));
2504 break;
2505
2506 case PM_STEP_END:
2507 DPRINT("PM_STEP_END\n");
2508 RegistrationNotify = (PREGISTRATIONNOTIFY)lParam;
2509 SendDlgItemMessage(hwndDlg, IDC_PROCESSPROGRESS, PBM_SETPOS, RegistrationNotify->Progress, 0);
2510 if (RegistrationNotify->LastError != ERROR_SUCCESS)
2511 {
2512 ShowStepError(hwndDlg, RegistrationNotify);
2513 }
2514 break;
2515
2516 case PM_ITEMS_DONE:
2517 DPRINT("PM_ITEMS_DONE\n");
2518 /* Enable the Back and Next buttons */
2521 break;
2522
2523 default:
2524 break;
2525 }
2526
2527 return FALSE;
2528}
#define IDC_PROCESSPROGRESS
Definition: resource.h:63
#define IDC_ITEM
Definition: resource.h:62
#define PM_STEP_START
Definition: globals.h:62
#define PM_ITEM_START
Definition: globals.h:52
#define PM_ITEM_END
Definition: globals.h:57
struct _REGISTRATIONNOTIFY * PREGISTRATIONNOTIFY
#define PM_STEP_END
Definition: globals.h:63
#define IDC_TASKTEXT4
Definition: resource.h:72
#define IDC_TASKTEXT1
Definition: resource.h:69
#define IDC_TASKTEXT3
Definition: resource.h:71
#define PSBTN_NEXT
Definition: prsht.h:147
LPCWSTR CurrentItem
Definition: globals.h:38
static VOID ShowItemError(HWND hwndDlg, DWORD LastError)
Definition: wizard.c:2355
static BOOL RunItemCompletionThread(_In_ HWND hwndDlg)
Definition: wizard.c:2322
static VOID ShowStepError(HWND hwndDlg, PREGISTRATIONNOTIFY RegistrationNotify)
Definition: wizard.c:2398
#define SW_HIDE
Definition: winuser.h:779

Referenced by InstallWizard().

◆ ProcessSetupInf()

VOID ProcessSetupInf ( IN OUT PSETUPDATA  pSetupData)

Definition at line 3109 of file wizard.c.

3111{
3113 WCHAR szValue[MAX_PATH];
3114 INFCONTEXT InfContext;
3115 DWORD LineLength;
3116 HKEY hKey;
3117 LONG res;
3118
3119 pSetupData->hSetupInf = INVALID_HANDLE_VALUE;
3120
3121 /* Retrieve the path of the setup INF */
3123 wcscat(szPath, L"\\$winnt$.inf");
3124
3125 /* Open the setup INF */
3126 pSetupData->hSetupInf = SetupOpenInfFileW(szPath,
3127 NULL,
3129 NULL);
3130 if (pSetupData->hSetupInf == INVALID_HANDLE_VALUE)
3131 {
3132 DPRINT1("Error: Cannot open the setup information file %S with error %d\n", szPath, GetLastError());
3133 return;
3134 }
3135
3136
3137 /* Retrieve the NT source path from which the 1st-stage installer was run */
3138 if (!SetupFindFirstLineW(pSetupData->hSetupInf,
3139 L"data",
3140 L"sourcepath",
3141 &InfContext))
3142 {
3143 DPRINT1("Error: Cannot find sourcepath Key! %d\n", GetLastError());
3144 return;
3145 }
3146
3147 if (!SetupGetStringFieldW(&InfContext,
3148 1,
3149 szValue,
3150 ARRAYSIZE(szValue),
3151 &LineLength))
3152 {
3153 DPRINT1("Error: SetupGetStringField failed with %d\n", GetLastError());
3154 return;
3155 }
3156
3157 *pSetupData->SourcePath = UNICODE_NULL;
3158
3159 /* Close the setup INF as we are going to modify it manually */
3160 if (pSetupData->hSetupInf != INVALID_HANDLE_VALUE)
3161 SetupCloseInfFile(pSetupData->hSetupInf);
3162
3163
3164 /* Find the installation source path in Win32 format */
3165 if (!GetInstallSourceWin32(pSetupData->SourcePath,
3166 _countof(pSetupData->SourcePath),
3167 szValue))
3168 {
3169 *pSetupData->SourcePath = UNICODE_NULL;
3170 }
3171
3172 /* Save the path in Win32 format in the setup INF */
3173 swprintf(szValue, L"\"%s\"", pSetupData->SourcePath);
3174 WritePrivateProfileStringW(L"data", L"dospath", szValue, szPath);
3175
3176 /*
3177 * Save it also in the registry, in the following keys:
3178 * - HKLM\Software\Microsoft\Windows\CurrentVersion\Setup ,
3179 * values "SourcePath" and "ServicePackSourcePath" (REG_SZ);
3180 * - HKLM\Software\Microsoft\Windows NT\CurrentVersion ,
3181 * value "SourcePath" (REG_SZ); set to the full path (e.g. D:\I386).
3182 */
3183#if 0
3185 L"Software\\Microsoft\\Windows NT\\CurrentVersion",
3186 0,
3188 &hKey);
3189
3190 if (res != ERROR_SUCCESS)
3191 {
3192 return FALSE;
3193 }
3194#endif
3195
3197 L"Software\\Microsoft\\Windows\\CurrentVersion\\Setup",
3198 0, NULL,
3200 KEY_ALL_ACCESS, // KEY_WRITE
3201 NULL,
3202 &hKey,
3203 NULL);
3204 if (res == ERROR_SUCCESS)
3205 {
3206 AddInstallationSource(hKey, pSetupData->SourcePath);
3207
3209 L"SourcePath",
3210 0,
3211 REG_SZ,
3212 (LPBYTE)pSetupData->SourcePath,
3213 (wcslen(pSetupData->SourcePath) + 1) * sizeof(WCHAR));
3214
3216 L"ServicePackSourcePath",
3217 0,
3218 REG_SZ,
3219 (LPBYTE)pSetupData->SourcePath,
3220 (wcslen(pSetupData->SourcePath) + 1) * sizeof(WCHAR));
3221
3223 }
3224
3225
3226 /* Now, re-open the setup INF (this must succeed) */
3227 pSetupData->hSetupInf = SetupOpenInfFileW(szPath,
3228 NULL,
3230 NULL);
3231 if (pSetupData->hSetupInf == INVALID_HANDLE_VALUE)
3232 {
3233 DPRINT1("Error: Cannot open the setup information file %S with error %d\n", szPath, GetLastError());
3234 return;
3235 }
3236
3237 /* Process the unattended section of the setup file */
3238 ProcessUnattendSection(pSetupData);
3239}
LONG WINAPI RegCreateKeyExW(_In_ HKEY hKey, _In_ LPCWSTR lpSubKey, _In_ DWORD Reserved, _In_opt_ LPWSTR lpClass, _In_ DWORD dwOptions, _In_ REGSAM samDesired, _In_opt_ LPSECURITY_ATTRIBUTES lpSecurityAttributes, _Out_ PHKEY phkResult, _Out_opt_ LPDWORD lpdwDisposition)
Definition: reg.c:1096
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
Definition: path.c:2313
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
Definition: profile.c:1453
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
Definition: parser.c:1229
#define swprintf
Definition: precomp.h:40
#define INF_STYLE_OLDNT
Definition: infsupp.h:39
#define KEY_ALL_ACCESS
Definition: nt_native.h:1041
#define REG_OPTION_NON_VOLATILE
Definition: nt_native.h:1057
static BOOL GetInstallSourceWin32(OUT PWSTR pwszPath, IN DWORD cchPathMax, IN PCWSTR pwszNTPath)
Definition: wizard.c:2660
static VOID AddInstallationSource(IN HKEY hKey, IN LPWSTR lpPath)
Definition: wizard.c:3018
VOID ProcessUnattendSection(IN OUT PSETUPDATA pSetupData)
Definition: wizard.c:2717
BOOL WINAPI SetupGetStringFieldW(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PWSTR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
Definition: infsupp.c:186
BOOL WINAPI SetupFindFirstLineW(IN HINF InfHandle, IN PCWSTR Section, IN PCWSTR Key, IN OUT PINFCONTEXT Context)
Definition: infsupp.c:56
DWORD WINAPI GetLastError(void)
Definition: except.c:1042

Referenced by InstallWizard().

◆ ProcessUnattendSection()

VOID ProcessUnattendSection ( IN OUT PSETUPDATA  pSetupData)

Definition at line 2717 of file wizard.c.

2719{
2720 INFCONTEXT InfContext;
2721 WCHAR szName[256];
2722 WCHAR szValue[MAX_PATH];
2723 DWORD LineLength;
2724 HKEY hKey;
2725
2726 if (!SetupFindFirstLineW(pSetupData->hSetupInf,
2727 L"Unattend",
2728 L"UnattendSetupEnabled",
2729 &InfContext))
2730 {
2731 DPRINT1("Error: Cannot find UnattendSetupEnabled Key! %d\n", GetLastError());
2732 return;
2733 }
2734
2735 if (!SetupGetStringFieldW(&InfContext,
2736 1,
2737 szValue,
2738 ARRAYSIZE(szValue),
2739 &LineLength))
2740 {
2741 DPRINT1("Error: SetupGetStringField failed with %d\n", GetLastError());
2742 return;
2743 }
2744
2745 if (_wcsicmp(szValue, L"yes") != 0)
2746 {
2747 DPRINT("Unattend setup was disabled by UnattendSetupEnabled key.\n");
2748 return;
2749 }
2750
2751 pSetupData->UnattendSetup = TRUE;
2752
2753 if (!SetupFindFirstLineW(pSetupData->hSetupInf,
2754 L"Unattend",
2755 NULL,
2756 &InfContext))
2757 {
2758 DPRINT1("Error: SetupFindFirstLine failed %d\n", GetLastError());
2759 return;
2760 }
2761
2762 do
2763 {
2764 if (!SetupGetStringFieldW(&InfContext,
2765 0,
2766 szName,
2768 &LineLength))
2769 {
2770 DPRINT1("Error: SetupGetStringField failed with %d\n", GetLastError());
2771 return;
2772 }
2773
2774 if (!SetupGetStringFieldW(&InfContext,
2775 1,
2776 szValue,
2777 ARRAYSIZE(szValue),
2778 &LineLength))
2779 {
2780 DPRINT1("Error: SetupGetStringField failed with %d\n", GetLastError());
2781 return;
2782 }
2783 DPRINT1("Name %S Value %S\n", szName, szValue);
2784 if (!_wcsicmp(szName, L"FullName"))
2785 {
2786 if (ARRAYSIZE(pSetupData->OwnerName) > LineLength)
2787 {
2788 wcscpy(pSetupData->OwnerName, szValue);
2789 }
2790 }
2791 else if (!_wcsicmp(szName, L"OrgName"))
2792 {
2793 if (ARRAYSIZE(pSetupData->OwnerOrganization) > LineLength)
2794 {
2795 wcscpy(pSetupData->OwnerOrganization, szValue);
2796 }
2797 }
2798 else if (!_wcsicmp(szName, L"ComputerName"))
2799 {
2800 if (ARRAYSIZE(pSetupData->ComputerName) > LineLength)
2801 {
2802 wcscpy(pSetupData->ComputerName, szValue);
2803 }
2804 }
2805 else if (!_wcsicmp(szName, L"AdminPassword"))
2806 {
2807 if (ARRAYSIZE(pSetupData->AdminPassword) > LineLength)
2808 {
2809 wcscpy(pSetupData->AdminPassword, szValue);
2810 }
2811 }
2812 else if (!_wcsicmp(szName, L"TimeZoneIndex"))
2813 {
2814 pSetupData->TimeZoneIndex = _wtoi(szValue);
2815 }
2816 else if (!_wcsicmp(szName, L"DisableAutoDaylightTimeSet"))
2817 {
2818 pSetupData->DisableAutoDaylightTimeSet = _wtoi(szValue);
2819 }
2820 else if (!_wcsicmp(szName, L"DisableGeckoInst"))
2821 {
2822 if (!_wcsicmp(szValue, L"yes"))
2823 pSetupData->DisableGeckoInst = TRUE;
2824 else
2825 pSetupData->DisableGeckoInst = FALSE;
2826 }
2827 else if (!_wcsicmp(szName, L"ProductOption"))
2828 {
2829 pSetupData->ProductOption = (PRODUCT_OPTION)_wtoi(szValue);
2830 }
2831 } while (SetupFindNextLine(&InfContext, &InfContext));
2832
2833 if (SetupFindFirstLineW(pSetupData->hSetupInf,
2834 L"Display",
2835 NULL,
2836 &InfContext))
2837 {
2838 DEVMODEW dm = { { 0 } };
2839 dm.dmSize = sizeof(dm);
2841 {
2842 do
2843 {
2844 int iValue;
2845 if (!SetupGetStringFieldW(&InfContext,
2846 0,
2847 szName,
2849 &LineLength))
2850 {
2851 DPRINT1("Error: SetupGetStringField failed with %d\n", GetLastError());
2852 return;
2853 }
2854
2855 if (!SetupGetStringFieldW(&InfContext,
2856 1,
2857 szValue,
2858 ARRAYSIZE(szValue),
2859 &LineLength))
2860 {
2861 DPRINT1("Error: SetupGetStringField failed with %d\n", GetLastError());
2862 return;
2863 }
2864 iValue = _wtoi(szValue);
2865 DPRINT1("Name %S Value %i\n", szName, iValue);
2866
2867 if (!iValue)
2868 continue;
2869
2870 if (!_wcsicmp(szName, L"BitsPerPel"))
2871 {
2872 dm.dmFields |= DM_BITSPERPEL;
2873 dm.dmBitsPerPel = iValue;
2874 }
2875 else if (!_wcsicmp(szName, L"XResolution"))
2876 {
2877 dm.dmFields |= DM_PELSWIDTH;
2878 dm.dmPelsWidth = iValue;
2879 }
2880 else if (!_wcsicmp(szName, L"YResolution"))
2881 {
2882 dm.dmFields |= DM_PELSHEIGHT;
2883 dm.dmPelsHeight = iValue;
2884 }
2885 else if (!_wcsicmp(szName, L"VRefresh"))
2886 {
2888 dm.dmDisplayFrequency = iValue;
2889 }
2890 } while (SetupFindNextLine(&InfContext, &InfContext));
2891
2893 }
2894 }
2895
2897 L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce",
2898 0,
2900 &hKey) != ERROR_SUCCESS)
2901 {
2902 DPRINT1("Error: failed to open HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\n");
2903 return;
2904 }
2905
2906 if (SetupFindFirstLineW(pSetupData->hSetupInf,
2907 L"GuiRunOnce",
2908 NULL,
2909 &InfContext))
2910 {
2911 int i = 0;
2912 do
2913 {
2914 if (SetupGetStringFieldW(&InfContext,
2915 0,
2916 szValue,
2917 ARRAYSIZE(szValue),
2918 NULL))
2919 {
2921 swprintf(szName, L"%d", i);
2922 DPRINT("szName %S szValue %S\n", szName, szValue);
2923
2925 {
2926 DPRINT("value %S\n", szPath);
2927 if (RegSetValueExW(hKey,
2928 szName,
2929 0,
2930 REG_SZ,
2931 (const BYTE*)szPath,
2932 (wcslen(szPath) + 1) * sizeof(WCHAR)) == ERROR_SUCCESS)
2933 {
2934 i++;
2935 }
2936 }
2937 }
2938 } while (SetupFindNextLine(&InfContext, &InfContext));
2939 }
2940
2942
2943 if (SetupFindFirstLineW(pSetupData->hSetupInf,
2944 L"Env",
2945 NULL,
2946 &InfContext))
2947 {
2948 if (RegCreateKeyExW(
2949 HKEY_LOCAL_MACHINE, L"SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment", 0, NULL,
2951 {
2952 DPRINT1("Error: failed to open HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\n");
2953 return;
2954 }
2955 do
2956 {
2957 if (!SetupGetStringFieldW(&InfContext,
2958 0,
2959 szName,
2961 &LineLength))
2962 {
2963 DPRINT1("Error: SetupGetStringField failed with %d\n", GetLastError());
2964 return;
2965 }
2966
2967 if (!SetupGetStringFieldW(&InfContext,
2968 1,
2969 szValue,
2970 ARRAYSIZE(szValue),
2971 &LineLength))
2972 {
2973 DPRINT1("Error: SetupGetStringField failed with %d\n", GetLastError());
2974 return;
2975 }
2976 DPRINT1("[ENV] %S=%S\n", szName, szValue);
2977
2978 DWORD dwType = wcschr(szValue, '%') != NULL ? REG_EXPAND_SZ : REG_SZ;
2979
2980 if (RegSetValueExW(hKey, szName, 0, dwType, (const BYTE*)szValue, (DWORD)(wcslen(szValue) + 1) * sizeof(TCHAR)) != ERROR_SUCCESS)
2981 {
2982 DPRINT1(" - Error %d\n", GetLastError());
2983 }
2984
2985 } while (SetupFindNextLine(&InfContext, &InfContext));
2986
2988 }
2989}
_Check_return_ _CRTIMP int __cdecl _wtoi(_In_z_ const wchar_t *_Str)
#define KEY_SET_VALUE
Definition: nt_native.h:1017
static const WCHAR szName[]
Definition: powrprof.c:45
DWORD dmBitsPerPel
Definition: wingdi.h:1647
DWORD dmFields
Definition: wingdi.h:1622
DWORD dmPelsWidth
Definition: wingdi.h:1648
DWORD dmPelsHeight
Definition: wingdi.h:1649
DWORD dmDisplayFrequency
Definition: wingdi.h:1654
WORD dmSize
Definition: wingdi.h:1620
enum _PRODUCT_OPTION PRODUCT_OPTION
BOOL WINAPI SetupFindNextLine(IN PINFCONTEXT ContextIn, OUT PINFCONTEXT ContextOut)
Definition: infsupp.c:82
BOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode)
Definition: display.c:408
LONG WINAPI ChangeDisplaySettingsW(LPDEVMODEW lpDevMode, DWORD dwflags)
Definition: display.c:612
#define DM_DISPLAYFREQUENCY
Definition: wingdi.h:1272
#define DM_PELSWIDTH
Definition: wingdi.h:1269
#define DM_BITSPERPEL
Definition: wingdi.h:1268
#define DM_PELSHEIGHT
Definition: wingdi.h:1270
#define CDS_UPDATEREGISTRY
Definition: winuser.h:181
#define ENUM_CURRENT_SETTINGS
Definition: winuser.h:179
char TCHAR
Definition: xmlstorage.h:189

Referenced by ProcessSetupInf().

◆ ProductPageDlgProc()

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

Definition at line 658 of file wizard.c.

659{
660 LPNMHDR lpnm;
661 PSETUPDATA pSetupData;
662 INT iItem;
663 WCHAR szText[64], szDefault[64];
664 HICON hIcon;
665
666 pSetupData = (PSETUPDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
667
668 switch (uMsg)
669 {
670 case WM_INITDIALOG:
671 {
672 pSetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
673 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pSetupData);
674
675 LoadStringW(hDllInstance, IDS_DEFAULT, szDefault, _countof(szDefault));
676
679 {
680 StringCchCatW(szText, _countof(szText), L" ");
681 StringCchCatW(szText, _countof(szText), szDefault);
682 }
684
687 {
688 StringCchCatW(szText, _countof(szText), L" ");
689 StringCchCatW(szText, _countof(szText), szDefault);
690 }
692
695
698 return TRUE;
699 }
700
701 case WM_COMMAND:
703 {
705 OnChooseOption(hwndDlg, (PRODUCT_OPTION)iItem);
706 }
707 break;
708
709 case WM_NOTIFY:
710 {
711 lpnm = (LPNMHDR)lParam;
712
713 switch (lpnm->code)
714 {
715 case PSN_SETACTIVE:
716 /* Enable the Back and Next buttons */
718 if (pSetupData->UnattendSetup)
719 {
720 OnChooseOption(hwndDlg, pSetupData->ProductOption);
723 return TRUE;
724 }
725 break;
726
727 case PSN_WIZNEXT:
729 pSetupData->ProductOption = (PRODUCT_OPTION)iItem;
731 break;
732
733 case PSN_WIZBACK:
734 pSetupData->UnattendSetup = FALSE;
735 break;
736
737 default:
738 break;
739 }
740 }
741 break;
742
743 default:
744 break;
745 }
746
747 return FALSE;
748}
#define IDS_PRODUCTWORKSTATIONNAME
Definition: resource.h:169
#define IDC_PRODUCT_ICON
Definition: resource.h:103
#define IDS_DEFAULT
Definition: resource.h:172
#define IDC_PRODUCT_OPTIONS
Definition: resource.h:104
#define IDS_PRODUCTSERVERNAME
Definition: resource.h:168
static HICON
Definition: imagelist.c:80
HICON hIcon
Definition: msconfig.c:44
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:325
static BOOL DoWriteProductOption(PRODUCT_OPTION nOption)
Definition: wizard.c:523
static void OnChooseOption(HWND hwndDlg, PRODUCT_OPTION nOption)
Definition: wizard.c:635
#define STM_SETICON
Definition: winuser.h:2103
#define CB_SETCURSEL
Definition: winuser.h:1972
#define IDI_WINLOGO
Definition: winuser.h:717
#define CBN_SELCHANGE
Definition: winuser.h:1990
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CB_ADDSTRING
Definition: winuser.h:1947
#define LoadIcon
Definition: winuser.h:5833
#define CB_GETCURSEL
Definition: winuser.h:1954

Referenced by InstallWizard().

◆ RegisterComponents()

static VOID RegisterComponents ( PITEMSDATA  pItemsData)
static

Definition at line 2241 of file wizard.c.

2243{
2244 WCHAR SectionName[512];
2246 LONG Steps = 0;
2249
2250 ZeroMemory(&Notify, sizeof(Notify));
2251
2252 /* Count the 'RegisterDlls' steps */
2253 if (!SetupFindFirstLineW(hSysSetupInf, L"RegistrationPhase2",
2254 L"RegisterDlls", &Context))
2255 {
2256 DPRINT1("No RegistrationPhase2 section found\n");
2257 return;
2258 }
2259
2260 if (!SetupGetStringFieldW(&Context, 1, SectionName,
2261 ARRAYSIZE(SectionName),
2262 NULL))
2263 {
2264 DPRINT1("Unable to retrieve section name\n");
2265 return;
2266 }
2267
2268 Steps += SetupGetLineCountW(hSysSetupInf, SectionName);
2269
2270 /* Count the 'TypeLibratries' steps */
2271 Steps += SetupGetLineCountW(hSysSetupInf, L"TypeLibraries");
2272
2273 /* Start the item */
2274 DPRINT("Register Components: %ld Steps\n", Steps);
2275 SendMessage(pItemsData->hwndDlg, PM_ITEM_START, 0, (LPARAM)Steps);
2276
2277 Error = RegisterDlls(pItemsData, &Notify);
2278 if (Error == ERROR_SUCCESS)
2279 RegisterTypeLibraries(pItemsData, &Notify, hSysSetupInf, L"TypeLibraries");
2280
2281 /* End the item */
2282 DPRINT("Register Components: done\n");
2283 SendMessage(pItemsData->hwndDlg, PM_ITEM_END, 0, Error);
2284}
#define NO_ERROR
Definition: dderror.h:5
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
static const WCHAR RegisterDlls[]
Definition: install.c:118
LONG WINAPI SetupGetLineCountW(HINF hinf, PCWSTR section)
Definition: parser.c:1501
HINF hSysSetupInf
Definition: install.c:37
BOOL RegisterTypeLibraries(_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify, _In_ HINF hinf, _In_ LPCWSTR szSection)
Definition: install.c:539

Referenced by ItemCompletionThread().

◆ RegisterDlls()

static DWORD RegisterDlls ( _In_ PITEMSDATA  pItemsData,
_In_ PREGISTRATIONNOTIFY  pNotify 
)
static

Definition at line 2170 of file wizard.c.

2173{
2174 REGISTRATIONDATA RegistrationData;
2175 WCHAR SectionName[512];
2177 LONG DllCount = 0;
2179
2180 ZeroMemory(&RegistrationData, sizeof(REGISTRATIONDATA));
2181 RegistrationData.hwndDlg = pItemsData->hwndDlg;
2182 RegistrationData.Registered = 0;
2183
2184 if (!SetupFindFirstLineW(hSysSetupInf, L"RegistrationPhase2",
2185 L"RegisterDlls", &Context))
2186 {
2187 DPRINT1("No RegistrationPhase2 section found\n");
2188 return GetLastError();
2189 }
2190
2191 if (!SetupGetStringFieldW(&Context, 1, SectionName,
2192 ARRAYSIZE(SectionName),
2193 NULL))
2194 {
2195 DPRINT1("Unable to retrieve section name\n");
2196 return GetLastError();
2197 }
2198
2199 DllCount = SetupGetLineCountW(hSysSetupInf, SectionName);
2200 DPRINT("SectionName %S DllCount %ld\n", SectionName, DllCount);
2201 if (DllCount < 0)
2202 {
2203 return STATUS_NOT_FOUND;
2204 }
2205
2206 RegistrationData.DllCount = (ULONG)DllCount;
2207 RegistrationData.DefaultContext = SetupInitDefaultQueueCallback(RegistrationData.hwndDlg);
2208 RegistrationData.pNotify = pNotify;
2209
2210 _SEH2_TRY
2211 {
2212 if (!SetupInstallFromInfSectionW(GetParent(RegistrationData.hwndDlg),
2214 L"RegistrationPhase2",
2215 SPINST_REGISTRY | SPINST_REGISTERCALLBACKAWARE | SPINST_REGSVR,
2216 0,
2217 NULL,
2218 0,
2220 &RegistrationData,
2221 NULL,
2222 NULL))
2223 {
2224 Error = GetLastError();
2225 }
2226 }
2228 {
2229 DPRINT("Catching exception\n");
2231 }
2232 _SEH2_END;
2233
2235
2236 return Error;
2237}
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
void WINAPI SetupTermDefaultQueueCallback(PVOID context)
Definition: queue.c:1656
PVOID WINAPI SetupInitDefaultQueueCallback(HWND owner)
Definition: queue.c:1629
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
#define EXCEPTION_EXECUTE_HANDLER
Definition: excpt.h:90
#define _SEH2_GetExceptionCode()
Definition: pseh2_64.h:181
#define _SEH2_EXCEPT(...)
Definition: pseh2_64.h:82
#define _SEH2_END
Definition: pseh2_64.h:171
#define _SEH2_TRY
Definition: pseh2_64.h:71
#define SPINST_REGSVR
Definition: setupapi.h:595
#define SPINST_REGISTRY
Definition: setupapi.h:591
#define STATUS_NOT_FOUND
Definition: shellext.h:72
PVOID DefaultContext
Definition: wizard.c:35
PREGISTRATIONNOTIFY pNotify
Definition: wizard.c:36
ULONG Registered
Definition: wizard.c:34
ULONG DllCount
Definition: wizard.c:33
static UINT CALLBACK RegistrationNotificationProc(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
Definition: wizard.c:2074

◆ RegistrationNotificationProc()

static UINT CALLBACK RegistrationNotificationProc ( PVOID  Context,
UINT  Notification,
UINT_PTR  Param1,
UINT_PTR  Param2 
)
static

Definition at line 2074 of file wizard.c.

2078{
2079 PREGISTRATIONDATA RegistrationData;
2082
2083 RegistrationData = (PREGISTRATIONDATA)Context;
2084
2087 {
2088 StatusInfo = (PSP_REGISTER_CONTROL_STATUSW) Param1;
2089 RegistrationData->pNotify->CurrentItem = wcsrchr(StatusInfo->FileName, L'\\');
2090 if (RegistrationData->pNotify->CurrentItem == NULL)
2091 {
2092 RegistrationData->pNotify->CurrentItem = StatusInfo->FileName;
2093 }
2094 else
2095 {
2096 RegistrationData->pNotify->CurrentItem++;
2097 }
2098
2100 {
2101 DPRINT("Received SPFILENOTIFY_STARTREGISTRATION notification for %S\n",
2102 StatusInfo->FileName);
2103 RegistrationData->pNotify->Progress = RegistrationData->Registered;
2104
2105 DPRINT("RegisterDll: Start step %ld\n", RegistrationData->pNotify->Progress);
2106 SendMessage(RegistrationData->hwndDlg, PM_STEP_START, 0, (LPARAM)RegistrationData->pNotify);
2107 }
2108 else
2109 {
2110 DPRINT("Received SPFILENOTIFY_ENDREGISTRATION notification for %S\n",
2111 StatusInfo->FileName);
2112 DPRINT("Win32Error %u FailureCode %u\n", StatusInfo->Win32Error,
2113 StatusInfo->FailureCode);
2114 if (StatusInfo->FailureCode != SPREG_SUCCESS)
2115 {
2116 switch (StatusInfo->FailureCode)
2117 {
2118 case SPREG_LOADLIBRARY:
2120 break;
2121 case SPREG_GETPROCADDR:
2123 break;
2124 case SPREG_REGSVR:
2126 break;
2127 case SPREG_DLLINSTALL:
2129 break;
2130 case SPREG_TIMEOUT:
2132 break;
2133 default:
2135 break;
2136 }
2137
2138 RegistrationData->pNotify->MessageID = MessageID;
2139 RegistrationData->pNotify->LastError = StatusInfo->Win32Error;
2140 }
2141 else
2142 {
2143 RegistrationData->pNotify->MessageID = 0;
2144 RegistrationData->pNotify->LastError = ERROR_SUCCESS;
2145 }
2146
2147 if (RegistrationData->Registered < RegistrationData->DllCount)
2148 {
2149 RegistrationData->Registered++;
2150 }
2151
2152 RegistrationData->pNotify->Progress = RegistrationData->Registered;
2153 DPRINT("RegisterDll: End step %ld\n", RegistrationData->pNotify->Progress);
2154 SendMessage(RegistrationData->hwndDlg, PM_STEP_END, 0, (LPARAM)RegistrationData->pNotify);
2155 }
2156
2157 return FILEOP_DOIT;
2158 }
2159 else
2160 {
2161 DPRINT1("Received unexpected notification %u\n", Notification);
2162 return SetupDefaultQueueCallback(RegistrationData->DefaultContext,
2163 Notification, Param1, Param2);
2164 }
2165}
#define IDS_TIMEOUT
Definition: resource.h:14
#define IDS_DLLINSTALL_FAILED
Definition: resource.h:137
#define IDS_REGSVR_FAILED
Definition: resource.h:136
#define IDS_LOADLIBRARY_FAILED
Definition: resource.h:134
#define IDS_GETPROCADDR_FAILED
Definition: resource.h:135
#define IDS_REASON_UNKNOWN
Definition: resource.h:139
#define FILEOP_DOIT
Definition: fileqsup.h:48
#define SPREG_GETPROCADDR
Definition: setupapi.h:655
#define SPREG_REGSVR
Definition: setupapi.h:656
#define SetupDefaultQueueCallback
Definition: setupapi.h:2573
#define SPFILENOTIFY_STARTREGISTRATION
Definition: setupapi.h:571
#define SPREG_SUCCESS
Definition: setupapi.h:653
struct _SP_REGISTER_CONTROL_STATUSW * PSP_REGISTER_CONTROL_STATUSW
#define SPREG_TIMEOUT
Definition: setupapi.h:658
#define SPFILENOTIFY_ENDREGISTRATION
Definition: setupapi.h:572
#define SPREG_DLLINSTALL
Definition: setupapi.h:657
#define SPREG_LOADLIBRARY
Definition: setupapi.h:654
struct _REGISTRATIONDATA * PREGISTRATIONDATA
_In_ PWDFDEVICE_INIT _In_ PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification
Definition: wdfcontrol.h:115
_In_ ULONG MessageID
Definition: wdfinterrupt.h:92

Referenced by RegisterDlls().

◆ RetrieveTimeZone()

static LONG RetrieveTimeZone ( IN HKEY  hZoneKey,
IN PVOID  Context 
)
static

Definition at line 1577 of file wizard.c.

1580{
1581 LONG lError;
1584 PTIMEZONE_ENTRY Current;
1585 ULONG DescriptionSize;
1586 ULONG StandardNameSize;
1587 ULONG DaylightNameSize;
1588
1590 if (Entry == NULL)
1591 {
1593 }
1594
1595 DescriptionSize = sizeof(Entry->Description);
1596 StandardNameSize = sizeof(Entry->StandardName);
1597 DaylightNameSize = sizeof(Entry->DaylightName);
1598
1599 lError = QueryTimeZoneData(hZoneKey,
1600 &Entry->Index,
1601 &Entry->TimezoneInfo,
1602 Entry->Description,
1603 &DescriptionSize,
1604 Entry->StandardName,
1605 &StandardNameSize,
1606 Entry->DaylightName,
1607 &DaylightNameSize);
1608 if (lError != ERROR_SUCCESS)
1609 {
1611 return lError;
1612 }
1613
1616 {
1617 Entry->Prev = NULL;
1618 Entry->Next = NULL;
1621 }
1622 else
1623 {
1624 Current = GetLargerTimeZoneEntry(SetupData, Entry->Index);
1625 if (Current != NULL)
1626 {
1627 if (Current == SetupData->TimeZoneListHead)
1628 {
1629 /* Prepend to head */
1630 Entry->Prev = NULL;
1634 }
1635 else
1636 {
1637 /* Insert before current */
1638 Entry->Prev = Current->Prev;
1639 Entry->Next = Current;
1640 Current->Prev->Next = Entry;
1641 Current->Prev = Entry;
1642 }
1643 }
1644 else
1645 {
1646 /* Append to tail */
1648 Entry->Next = NULL;
1651 }
1652 }
1653
1654 return ERROR_SUCCESS;
1655}
#define ERROR_NOT_ENOUGH_MEMORY
Definition: dderror.h:7
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] STATPROPSETSTG *rgelt, [out] ULONG *pceltFetched)
struct _TIMEZONE_ENTRY * Prev
Definition: timezone.c:17
static PTIMEZONE_ENTRY GetLargerTimeZoneEntry(PSETUPDATA SetupData, DWORD Index)
Definition: wizard.c:1560
LONG QueryTimeZoneData(IN HKEY hZoneKey, OUT PULONG Index OPTIONAL, OUT PREG_TZI_FORMAT TimeZoneInfo, OUT PWCHAR Description OPTIONAL, IN OUT PULONG DescriptionSize OPTIONAL, OUT PWCHAR StandardName OPTIONAL, IN OUT PULONG StandardNameSize OPTIONAL, OUT PWCHAR DaylightName OPTIONAL, IN OUT PULONG DaylightNameSize OPTIONAL)
Definition: tzlib.c:141

Referenced by CreateTimeZoneList().

◆ RunControlPanelApplet()

static BOOL RunControlPanelApplet ( HWND  hwnd,
PCWSTR  pwszCPLParameters 
)
static

Definition at line 1309 of file wizard.c.

1310{
1311 MSG msg;
1312 HWND MainWindow = GetParent(hwnd);
1313 STARTUPINFOW StartupInfo;
1314 PROCESS_INFORMATION ProcessInformation;
1315 WCHAR CmdLine[MAX_PATH] = L"rundll32.exe shell32.dll,Control_RunDLL ";
1316
1317 if (!pwszCPLParameters)
1318 {
1319 MessageBoxW(hwnd, L"Error: Failed to launch the Control Panel Applet.", NULL, MB_ICONERROR);
1320 return FALSE;
1321 }
1322
1323 ZeroMemory(&StartupInfo, sizeof(StartupInfo));
1324 StartupInfo.cb = sizeof(StartupInfo);
1325 ZeroMemory(&ProcessInformation, sizeof(ProcessInformation));
1326
1327 ASSERT(_countof(CmdLine) > wcslen(CmdLine) + wcslen(pwszCPLParameters));
1328 wcscat(CmdLine, pwszCPLParameters);
1329
1330 if (!CreateProcessW(NULL,
1331 CmdLine,
1332 NULL,
1333 NULL,
1334 FALSE,
1335 0,
1336 NULL,
1337 NULL,
1338 &StartupInfo,
1339 &ProcessInformation))
1340 {
1341 MessageBoxW(hwnd, L"Error: Failed to launch the Control Panel Applet.", NULL, MB_ICONERROR);
1342 return FALSE;
1343 }
1344
1345 /* Disable the Back and Next buttons and the main window
1346 * while we're interacting with the control panel applet */
1347 PropSheet_SetWizButtons(MainWindow, 0);
1348 EnableWindow(MainWindow, FALSE);
1349
1351 {
1352 /* We still need to process main window messages to avoid freeze */
1353 while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE))
1354 {
1357 }
1358 }
1359 CloseHandle(ProcessInformation.hThread);
1360 CloseHandle(ProcessInformation.hProcess);
1361
1362 /* Enable the Back and Next buttons and the main window again */
1364 EnableWindow(MainWindow, TRUE);
1365
1366 return TRUE;
1367}
#define CloseHandle
Definition: compat.h:739
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:4598
static const WCHAR CmdLine[]
Definition: install.c:48
#define INFINITE
Definition: serial.h:102
DWORD cb
Definition: winbase.h:877
#define WAIT_OBJECT_0
Definition: winbase.h:432
#define QS_ALLPOSTMESSAGE
Definition: winuser.h:893
#define QS_ALLINPUT
Definition: winuser.h:914
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
#define PM_REMOVE
Definition: winuser.h:1207
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)

Referenced by EnableVisualTheme(), and LocalePageDlgProc().

◆ RunItemCompletionThread()

static BOOL RunItemCompletionThread ( _In_ HWND  hwndDlg)
static

Definition at line 2322 of file wizard.c.

2324{
2325 HANDLE hCompletionThread;
2326 PITEMSDATA pItemsData;
2327
2328 pItemsData = HeapAlloc(GetProcessHeap(), 0, sizeof(ITEMSDATA));
2329 if (pItemsData == NULL)
2330 return FALSE;
2331
2332 pItemsData->hwndDlg = hwndDlg;
2333
2334 hCompletionThread = CreateThread(NULL,
2335 0,
2337 pItemsData,
2338 0,
2339 NULL);
2340 if (hCompletionThread == NULL)
2341 {
2342 HeapFree(GetProcessHeap(), 0, pItemsData);
2343 }
2344 else
2345 {
2346 CloseHandle(hCompletionThread);
2347 return TRUE;
2348 }
2349
2350 return FALSE;
2351}
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
static DWORD CALLBACK ItemCompletionThread(LPVOID Parameter)
Definition: wizard.c:2290

Referenced by ProcessPageDlgProc().

◆ SetInstallationCompleted()

static VOID SetInstallationCompleted ( VOID  )
static

Definition at line 2532 of file wizard.c.

2533{
2534 HKEY hKey = 0;
2535 DWORD InProgress = 0;
2536 DWORD InstallDate;
2537
2539 L"SYSTEM\\Setup",
2540 0,
2541 KEY_WRITE,
2542 &hKey ) == ERROR_SUCCESS)
2543 {
2544 RegSetValueExW( hKey, L"SystemSetupInProgress", 0, REG_DWORD, (LPBYTE)&InProgress, sizeof(InProgress) );
2545 RegCloseKey( hKey );
2546 }
2547
2549 L"Software\\Microsoft\\Windows NT\\CurrentVersion",
2550 0,
2551 KEY_WRITE,
2552 &hKey ) == ERROR_SUCCESS)
2553 {
2554 InstallDate = (DWORD)time(NULL);
2555 RegSetValueExW( hKey, L"InstallDate", 0, REG_DWORD, (LPBYTE)&InstallDate, sizeof(InstallDate) );
2556 RegCloseKey( hKey );
2557 }
2558}
__u16 time
Definition: mkdosfs.c:8
#define DWORD
Definition: nt_native.h:44

Referenced by FinishDlgProc().

◆ SetKeyboardLayoutName()

static VOID SetKeyboardLayoutName ( HWND  hwnd)
static

Definition at line 1227 of file wizard.c.

1228{
1229 HKL hkl;
1230 BOOL LayoutSpecial = FALSE;
1231 WCHAR LayoutPath[256];
1232 WCHAR LocaleName[32];
1233 WCHAR SpecialId[5] = L"";
1234 WCHAR ResText[256] = L"";
1235 DWORD dwValueSize;
1236 HKEY hKey;
1237 UINT i;
1238
1239 /* Get the default input language and method */
1240 if (!SystemParametersInfoW(SPI_GETDEFAULTINPUTLANG, 0, (LPDWORD)&hkl, 0))
1241 {
1243 }
1244
1245 if ((HIWORD(hkl) & 0xF000) == 0xF000)
1246 {
1247 /* Process keyboard layout with special id */
1248 StringCchPrintfW(SpecialId, ARRAYSIZE(SpecialId), L"%04x", (HIWORD(hkl) & 0x0FFF));
1249 LayoutSpecial = TRUE;
1250 }
1251
1252#define MAX_LAYOUTS_PER_LANGID 0x10000
1253 for (i = 0; i < (LayoutSpecial ? MAX_LAYOUTS_PER_LANGID : 1); i++)
1254 {
1255 /* Generate a hexadecimal identifier for keyboard layout registry key */
1257
1258 StringCchCopyW(LayoutPath, ARRAYSIZE(LayoutPath), L"SYSTEM\\CurrentControlSet\\Control\\Keyboard Layouts\\");
1259 StringCchCatW(LayoutPath, ARRAYSIZE(LayoutPath), LocaleName);
1261
1263 LayoutPath,
1264 0,
1266 &hKey) == ERROR_SUCCESS)
1267 {
1268 /* Make sure the keyboard layout key we opened is the one we need.
1269 * If the layout has no special id, just pass this check. */
1270 dwValueSize = sizeof(LocaleName);
1271 if (!LayoutSpecial ||
1273 L"Layout Id",
1274 NULL,
1275 NULL,
1276 (PVOID)&LocaleName,
1277 &dwValueSize) == ERROR_SUCCESS) &&
1278 (wcscmp(LocaleName, SpecialId) == 0)))
1279 {
1281 dwValueSize = sizeof(LocaleName);
1283 L"Layout Text",
1284 NULL,
1285 NULL,
1286 (PVOID)&LocaleName,
1287 &dwValueSize);
1288 /* Let the loop know where to stop */
1290 }
1292 }
1293 else
1294 {
1295 /* Keyboard layout registry keys are expected to go in order without gaps */
1296 break;
1297 }
1298 }
1299#undef MAX_LAYOUTS_PER_LANGID
1300
1301 LoadStringW(hDllInstance, IDS_LAYOUTTEXT, ResText, ARRAYSIZE(ResText));
1302 StringCchPrintfW(LayoutPath, ARRAYSIZE(LayoutPath), ResText, LocaleName);
1303
1304 SetWindowTextW(hwnd, LayoutPath);
1305}
static _In_ LPCWSTR LocaleName
#define IDS_LAYOUTTEXT
Definition: resource.h:119
unsigned int BOOL
Definition: ntddk_ex.h:94
HKL hkl
Definition: msctf.idl:650
UINT_PTR HKL
Definition: msctf.idl:143
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
#define MAX_LAYOUTS_PER_LANGID
uint32_t * LPDWORD
Definition: typedefs.h:59
HKL WINAPI GetKeyboardLayout(_In_ DWORD)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)

Referenced by LocalePageDlgProc().

◆ SetLocalTimeZone()

static VOID SetLocalTimeZone ( HWND  hwnd,
PSETUPDATA  SetupData 
)
static

Definition at line 1716 of file wizard.c.

1717{
1718 TIME_ZONE_INFORMATION TimeZoneInformation;
1720 DWORD dwIndex;
1721 DWORD i;
1722
1723 dwIndex = SendMessage(hwnd,
1725 0,
1726 0);
1727
1728 i = 0;
1730 while (i < dwIndex)
1731 {
1732 if (Entry == NULL)
1733 return;
1734
1735 i++;
1736 Entry = Entry->Next;
1737 }
1738
1739 wcscpy(TimeZoneInformation.StandardName,
1740 Entry->StandardName);
1741 wcscpy(TimeZoneInformation.DaylightName,
1742 Entry->DaylightName);
1743
1744 TimeZoneInformation.Bias = Entry->TimezoneInfo.Bias;
1745 TimeZoneInformation.StandardBias = Entry->TimezoneInfo.StandardBias;
1746 TimeZoneInformation.DaylightBias = Entry->TimezoneInfo.DaylightBias;
1747
1748 memcpy(&TimeZoneInformation.StandardDate,
1749 &Entry->TimezoneInfo.StandardDate,
1750 sizeof(SYSTEMTIME));
1751 memcpy(&TimeZoneInformation.DaylightDate,
1752 &Entry->TimezoneInfo.DaylightDate,
1753 sizeof(SYSTEMTIME));
1754
1755 /* Set time zone information */
1756 SetTimeZoneInformation(&TimeZoneInformation);
1757}
BOOL WINAPI SetTimeZoneInformation(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation)
Definition: timezone.c:316
SYSTEMTIME DaylightDate
Definition: winbase.h:1242
WCHAR DaylightName[32]
Definition: winbase.h:1241
WCHAR StandardName[32]
Definition: winbase.h:1238
SYSTEMTIME StandardDate
Definition: winbase.h:1239

Referenced by WriteDateTimeSettings().

◆ SetSystemLocalTime()

static BOOL SetSystemLocalTime ( HWND  hwnd,
PSETUPDATA  SetupData 
)
static

Definition at line 1790 of file wizard.c.

1791{
1792 BOOL Ret = FALSE;
1793
1794 /*
1795 * Call SetLocalTime twice to ensure correct results
1796 */
1799
1800 return Ret;
1801}
BOOL WINAPI SetLocalTime(IN CONST SYSTEMTIME *lpSystemTime)
Definition: time.c:356

Referenced by WriteDateTimeSettings().

◆ SetUserLocaleName()

static VOID SetUserLocaleName ( HWND  hwnd)
static

Definition at line 1210 of file wizard.c.

1211{
1212 WCHAR CurLocale[256] = L"";
1213 WCHAR CurGeo[256] = L"";
1214 WCHAR ResText[256] = L"";
1215 WCHAR LocaleText[256 * 2];
1216
1219
1220 LoadStringW(hDllInstance, IDS_LOCALETEXT, ResText, ARRAYSIZE(ResText));
1221 StringCchPrintfW(LocaleText, ARRAYSIZE(LocaleText), ResText, CurLocale, CurGeo);
1222
1223 SetWindowTextW(hwnd, LocaleText);
1224}
GEOID WINAPI GetUserGeoID(GEOCLASS GeoClass)
Definition: locale.c:4838
LCID WINAPI GetThreadLocale(void)
Definition: locale.c:2801
INT WINAPI GetGeoInfoW(GEOID geoid, GEOTYPE geotype, LPWSTR data, int data_len, LANGID lang)
Definition: locale.c:5492
LCID WINAPI GetUserDefaultLCID(void)
Definition: locale.c:1211
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
Definition: locale.c:1666
#define IDS_LOCALETEXT
Definition: resource.h:118
@ GEO_FRIENDLYNAME
Definition: winnls.h:571
#define LOCALE_SLANGUAGE
Definition: winnls.h:26
@ GEOCLASS_NATION
Definition: winnls.h:557

Referenced by LocalePageDlgProc().

◆ ShowItemError()

static VOID ShowItemError ( HWND  hwndDlg,
DWORD  LastError 
)
static

Definition at line 2355 of file wizard.c.

2358{
2360 WCHAR UnknownError[84];
2361 WCHAR Title[64];
2362
2364 NULL, LastError, 0, ErrorMessage, 0, NULL) == 0)
2365 {
2367 UnknownError,
2368 ARRAYSIZE(UnknownError) - 20) == 0)
2369 {
2370 wcscpy(UnknownError, L"Unknown error");
2371 }
2372 wcscat(UnknownError, L" ");
2373 _ultow(LastError, UnknownError + wcslen(UnknownError), 10);
2374 ErrorMessage = UnknownError;
2375 }
2376
2377 if (ErrorMessage != NULL)
2378 {
2380 Title, ARRAYSIZE(Title)) == 0)
2381 {
2382 wcscpy(Title, L"ReactOS Setup");
2383 }
2384
2386 }
2387
2388 if (ErrorMessage != NULL &&
2389 ErrorMessage != UnknownError)
2390 {
2392 }
2393}
static VOID ErrorMessage(_In_ DWORD dwErrorCode, _In_opt_ PCWSTR pszMsg,...)
Definition: attrib.c:33
DWORD WINAPI FormatMessageW(DWORD dwFlags, LPCVOID lpSource, DWORD dwMessageId, DWORD dwLanguageId, LPWSTR lpBuffer, DWORD nSize, __ms_va_list *args)
Definition: format_msg.c:583
#define IDS_UNKNOWN_ERROR
Definition: resource.h:133
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1594
_CRTIMP wchar_t *__cdecl _ultow(_In_ unsigned long _Value, _Pre_notnull_ _Post_z_ wchar_t *_Dest, _In_ int _Radix)
#define FORMAT_MESSAGE_FROM_SYSTEM
Definition: winbase.h:449
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:445

Referenced by ProcessPageDlgProc().

◆ ShowStepError()

static VOID ShowStepError ( HWND  hwndDlg,
PREGISTRATIONNOTIFY  RegistrationNotify 
)
static

Definition at line 2398 of file wizard.c.

2401{
2402 WCHAR ErrorMessage[128];
2403 WCHAR Title[64];
2404
2405 if (LoadStringW(hDllInstance, RegistrationNotify->MessageID,
2407 ARRAYSIZE(ErrorMessage)) == 0)
2408 {
2409 ErrorMessage[0] = L'\0';
2410 }
2411
2412 if (RegistrationNotify->MessageID != IDS_TIMEOUT)
2413 {
2415 RegistrationNotify->LastError, 0,
2418 NULL);
2419 }
2420
2421 if (ErrorMessage[0] != L'\0')
2422 {
2424 Title, ARRAYSIZE(Title)) == 0)
2425 {
2426 wcscpy(Title, L"ReactOS Setup");
2427 }
2428
2429 MessageBoxW(hwndDlg, ErrorMessage,
2431 }
2432}

Referenced by ProcessPageDlgProc().

◆ ShowTimeZoneList()

static VOID ShowTimeZoneList ( HWND  hwnd,
PSETUPDATA  SetupData,
DWORD  dwEntryIndex 
)
static

Definition at line 1686 of file wizard.c.

1687{
1689 DWORD dwIndex = 0;
1690 DWORD dwCount;
1691
1692 GetTimeZoneListIndex(&dwEntryIndex);
1693
1695 while (Entry != NULL)
1696 {
1697 dwCount = SendMessage(hwnd,
1699 0,
1700 (LPARAM)Entry->Description);
1701
1702 if (dwEntryIndex != 0 && dwEntryIndex == Entry->Index)
1703 dwIndex = dwCount;
1704
1705 Entry = Entry->Next;
1706 }
1707
1710 (WPARAM)dwIndex,
1711 0);
1712}
BOOL GetTimeZoneListIndex(IN OUT PULONG pIndex)
Definition: tzlib.c:20

Referenced by DateTimePageDlgProc().

◆ ThemePageDlgProc()

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

Definition at line 1963 of file wizard.c.

1967{
1969 LPNMLISTVIEW pnmv;
1970
1971 /* Retrieve pointer to the global setup data */
1973
1974 switch (uMsg)
1975 {
1976 case WM_INITDIALOG:
1977 {
1978 HWND hListView;
1980 DWORD n;
1981 LVITEM lvi = {0};
1982
1983 /* Save pointer to the global setup data */
1986
1987 hListView = GetDlgItem(hwndDlg, IDC_THEMEPICKER);
1988
1989 /* Common */
1991 lvi.mask = LVIF_TEXT | LVIF_IMAGE |LVIF_STATE;
1992
1993 for (n = 0; n < ARRAYSIZE(Themes); ++n)
1994 {
1995 WCHAR DisplayName[100] = {0};
1996 /* Load the bitmap */
1998 ImageList_AddMasked(himl, image, RGB(255,0,255));
1999
2000 /* Load the string */
2001 LoadStringW(hDllInstance, Themes[n].DisplayName, DisplayName, ARRAYSIZE(DisplayName));
2002 DisplayName[ARRAYSIZE(DisplayName)-1] = UNICODE_NULL;
2003
2004 /* Add the listview item */
2005 lvi.iItem = n;
2006 lvi.iImage = n;
2007 lvi.pszText = DisplayName;
2008 ListView_InsertItem(hListView, &lvi);
2009 }
2010
2011 /* Register the imagelist */
2013 /* Transparent background */
2014 ListView_SetBkColor(hListView, CLR_NONE);
2016 /* Reduce the size between the items */
2017 ListView_SetIconSpacing(hListView, 190, 173);
2018 break;
2019 }
2020
2021 case WM_NOTIFY:
2022 switch (((LPNMHDR)lParam)->code)
2023 {
2024 //case LVN_ITEMCHANGING:
2025 case LVN_ITEMCHANGED:
2026 pnmv = (LPNMLISTVIEW)lParam;
2027 if ((pnmv->uChanged & LVIF_STATE) && (pnmv->uNewState & LVIS_SELECTED))
2028 {
2029 int iTheme = pnmv->iItem;
2030 DPRINT1("Selected theme: %u\n", Themes[iTheme].DisplayName);
2031
2032 if (Themes[iTheme].ThemeFile)
2033 {
2034 WCHAR wszTheme[MAX_PATH];
2035 SHGetFolderPathAndSubDirW(0, CSIDL_RESOURCES, NULL, SHGFP_TYPE_DEFAULT, Themes[iTheme].ThemeFile, wszTheme);
2036 EnableVisualTheme(hwndDlg, wszTheme);
2037 }
2038 else
2039 {
2040 EnableVisualTheme(hwndDlg, Themes[iTheme].ThemeFile);
2041 }
2042 }
2043 break;
2044 case PSN_SETACTIVE:
2045 /* Enable the Back and Next buttons */
2048 {
2050 return TRUE;
2051 }
2052 break;
2053
2054 case PSN_WIZNEXT:
2055 break;
2056
2057 case PSN_WIZBACK:
2059 break;
2060
2061 default:
2062 break;
2063 }
2064 break;
2065
2066 default:
2067 break;
2068 }
2069
2070 return FALSE;
2071}
HIMAGELIST himl
INT WINAPI ImageList_AddMasked(HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
Definition: imagelist.c:573
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:814
HRESULT WINAPI SHGetFolderPathAndSubDirW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPCWSTR pszSubPath, LPWSTR pszPath)
Definition: shellpath.c:2805
#define IDC_THEMEPICKER
Definition: resource.h:83
#define RGB(r, g, b)
Definition: precomp.h:71
GLdouble n
Definition: glext.h:7729
#define ListView_InsertItem(hwnd, pitem)
Definition: commctrl.h:2413
#define ListView_SetIconSpacing(hwndLV, cx, cy)
Definition: commctrl.h:2728
#define LVIF_STATE
Definition: commctrl.h:2317
#define ListView_SetImageList(hwnd, himl, iImageList)
Definition: commctrl.h:2309
#define CLR_NONE
Definition: commctrl.h:319
#define ListView_SetBkColor(hwnd, clrBk)
Definition: commctrl.h:2299
#define ILC_COLOR32
Definition: commctrl.h:358
#define LVIS_SELECTED
Definition: commctrl.h:2324
#define LVITEM
Definition: commctrl.h:2380
struct tagNMLISTVIEW * LPNMLISTVIEW
#define LVIF_TEXT
Definition: commctrl.h:2314
#define ILC_MASK
Definition: commctrl.h:351
#define LVIF_IMAGE
Definition: commctrl.h:2315
#define ListView_SetTextBkColor(hwnd, clrTextBk)
Definition: commctrl.h:2668
#define LVN_ITEMCHANGED
Definition: commctrl.h:3136
#define LVSIL_NORMAL
Definition: commctrl.h:2303
@ SHGFP_TYPE_DEFAULT
Definition: shlobj.h:2158
#define CSIDL_RESOURCES
Definition: shlobj.h:2233
UINT uNewState
Definition: commctrl.h:3041
VOID EnableVisualTheme(_In_opt_ HWND hwndParent, _In_opt_ PCWSTR ThemeFile)
Definition: wizard.c:1371
static struct ThemeInfo Themes[]
#define IMAGE_BITMAP
Definition: winuser.h:211
#define LR_CREATEDIBSECTION
Definition: winuser.h:1109
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:2540

Referenced by InstallWizard().

◆ UpdateLocalSystemTime()

static VOID UpdateLocalSystemTime ( HWND  hwnd,
SYSTEMTIME  LocalTime 
)
static

Definition at line 1805 of file wizard.c.

1806{
1809}
#define DateTime_SetSystemtime(hdp, gd, pst)
Definition: commctrl.h:4337

Referenced by DateTimePageDlgProc().

◆ WelcomeDlgProc()

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

Definition at line 191 of file wizard.c.

195{
196 PSETUPDATA pSetupData;
197
198 pSetupData = (PSETUPDATA)GetWindowLongPtr(hwndDlg, DWLP_USER);
199
200 switch (uMsg)
201 {
202 case WM_INITDIALOG:
203 {
204 HWND hwndControl;
205 DWORD dwStyle;
206
207 /* Get pointer to the global setup data */
208 pSetupData = (PSETUPDATA)((LPPROPSHEETPAGE)lParam)->lParam;
209 SetWindowLongPtr(hwndDlg, DWLP_USER, (LONG_PTR)pSetupData);
210
211 hwndControl = GetParent(hwndDlg);
212
213 /* Center the wizard window */
214 CenterWindow (hwndControl);
215
216 /* Hide the system menu */
217 dwStyle = GetWindowLongPtr(hwndControl, GWL_STYLE);
218 SetWindowLongPtr(hwndControl, GWL_STYLE, dwStyle & ~WS_SYSMENU);
219
220 /* Hide and disable the 'Cancel' button */
221 hwndControl = GetDlgItem(GetParent(hwndDlg), IDCANCEL);
222 ShowWindow (hwndControl, SW_HIDE);
223 EnableWindow (hwndControl, FALSE);
224
225 /* Set title font */
226 SendDlgItemMessage(hwndDlg,
229 (WPARAM)pSetupData->hTitleFont,
230 (LPARAM)TRUE);
231 }
232 break;
233
234
235 case WM_NOTIFY:
236 {
237 LPNMHDR lpnm = (LPNMHDR)lParam;
238
239 switch (lpnm->code)
240 {
241 case PSN_SETACTIVE:
242 LogItem(L"BEGIN", L"WelcomePage");
243 /* Enable the Next button */
245 if (pSetupData->UnattendSetup)
246 {
248 return TRUE;
249 }
250 break;
251
252 case PSN_WIZNEXT:
253 LogItem(L"END", L"WelcomePage");
254 break;
255
256 case PSN_WIZBACK:
257 pSetupData->UnattendSetup = FALSE;
258 break;
259
260 default:
261 break;
262 }
263 }
264 break;
265
266 default:
267 break;
268 }
269
270 return FALSE;
271}
#define IDC_WELCOMETITLE
Definition: resource.h:16
static VOID CenterWindow(IN HWND hWnd)
Definition: wizard.c:31
#define WS_SYSMENU
Definition: pedump.c:629
#define GWL_STYLE
Definition: winuser.h:863

◆ WriteComputerSettings()

static BOOL WriteComputerSettings ( WCHAR ComputerName,
HWND  hwndDlg 
)
static

Definition at line 903 of file wizard.c.

904{
905 WCHAR Title[64];
906 WCHAR ErrorComputerName[256];
907 LONG lError;
908 HKEY hKey = NULL;
909
910 if (!SetComputerNameW(ComputerName))
911 {
912 if (hwndDlg != NULL)
913 {
915 {
916 wcscpy(Title, L"ReactOS Setup");
917 }
918 if (0 == LoadStringW(hDllInstance, IDS_WZD_SETCOMPUTERNAME, ErrorComputerName,
919 ARRAYSIZE(ErrorComputerName)))
920 {
921 wcscpy(ErrorComputerName, L"Setup failed to set the computer name.");
922 }
923 MessageBoxW(hwndDlg, ErrorComputerName, Title, MB_ICONERROR | MB_OK);
924 }
925
926 return FALSE;
927 }
928
929 /* Set the physical DNS domain */
930 SetComputerNameExW(ComputerNamePhysicalDnsDomain, L"");
931
932 /* Set the physical DNS hostname */
933 SetComputerNameExW(ComputerNamePhysicalDnsHostname, ComputerName);
934
935 /* Set the accounts domain name */
936 SetAccountsDomainSid(NULL, ComputerName);
937
938 /* Now we need to set the Hostname */
940 L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters",
941 0,
942 NULL,
944 KEY_WRITE,
945 NULL,
946 &hKey,
947 NULL);
948 if (lError == ERROR_SUCCESS)
949 {
950 lError = RegSetValueEx(hKey,
951 L"Hostname",
952 0,
953 REG_SZ,
954 (LPBYTE)ComputerName,
955 (wcslen(ComputerName) + 1) * sizeof(WCHAR));
956 if (lError != ERROR_SUCCESS)
957 {
958 DPRINT1("RegSetValueEx(\"Hostname\") failed (%08lX)\n", lError);
959 }
960
962 }
963 else
964 {
965 DPRINT1("RegCreateKeyExW for Tcpip\\Parameters failed (%08lX)\n", lError);
966 }
967
968 return TRUE;
969}
BOOL WINAPI SetComputerNameW(LPCWSTR lpComputerName)
Definition: compname.c:616
BOOL WINAPI SetComputerNameExW(COMPUTER_NAME_FORMAT NameType, LPCWSTR lpBuffer)
Definition: compname.c:648
#define IDS_WZD_SETCOMPUTERNAME
Definition: resource.h:144
NTSTATUS WINAPI SetAccountsDomainSid(PSID DomainSid, LPCWSTR DomainName)
Definition: security.c:28
#define RegSetValueEx
Definition: winreg.h:533

Referenced by ComputerPageDlgProc().

◆ WriteDateTimeSettings()

static BOOL WriteDateTimeSettings ( HWND  hwndDlg,
PSETUPDATA  SetupData 
)
static

Definition at line 1813 of file wizard.c.

1814{
1815 WCHAR Title[64];
1816 WCHAR ErrorLocalTime[256];
1817
1818 GetLocalSystemTime(hwndDlg, SetupData);
1820 SetupData);
1821
1823 BM_GETCHECK, 0, 0) != BST_UNCHECKED);
1824 if (!SetSystemLocalTime(hwndDlg, SetupData))
1825 {
1827 {
1828 wcscpy(Title, L"ReactOS Setup");
1829 }
1830 if (0 == LoadStringW(hDllInstance, IDS_WZD_LOCALTIME, ErrorLocalTime,
1831 ARRAYSIZE(ErrorLocalTime)))
1832 {
1833 wcscpy(ErrorLocalTime, L"Setup was unable to set the local time.");
1834 }
1835 MessageBoxW(hwndDlg, ErrorLocalTime, Title, MB_ICONWARNING | MB_OK);
1836 return FALSE;
1837 }
1838
1839 return TRUE;
1840}
#define IDS_WZD_LOCALTIME
Definition: resource.h:149
static BOOL SetSystemLocalTime(HWND hwnd, PSETUPDATA SetupData)
Definition: wizard.c:1790
static BOOL GetLocalSystemTime(HWND hwnd, PSETUPDATA SetupData)
Definition: wizard.c:1761
static VOID SetLocalTimeZone(HWND hwnd, PSETUPDATA SetupData)
Definition: wizard.c:1716
VOID SetAutoDaylight(IN BOOL EnableAutoDaylightTime)
Definition: tzlib.c:323
#define BST_UNCHECKED
Definition: winuser.h:199
#define MB_ICONWARNING
Definition: winuser.h:797
#define BM_GETCHECK
Definition: winuser.h:1929

Referenced by DateTimePageDlgProc().

◆ WriteDefaultLogonData()

static BOOL WriteDefaultLogonData ( LPWSTR  Domain)
static

Definition at line 974 of file wizard.c.

975{
976 WCHAR szAdministratorName[256];
977 HKEY hKey = NULL;
978 LONG lError;
979
982 szAdministratorName,
983 ARRAYSIZE(szAdministratorName)) == 0)
984 {
985 wcscpy(szAdministratorName, L"Administrator");
986 }
987
989 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
990 0,
992 &hKey);
993 if (lError != ERROR_SUCCESS)
994 return FALSE;
995
996 lError = RegSetValueEx(hKey,
997 L"DefaultDomainName",
998 0,
999 REG_SZ,
1000 (LPBYTE)Domain,
1001 (wcslen(Domain)+ 1) * sizeof(WCHAR));
1002 if (lError != ERROR_SUCCESS)
1003 {
1004 DPRINT1("RegSetValueEx(\"DefaultDomainName\") failed!\n");
1005 }
1006
1007 lError = RegSetValueEx(hKey,
1008 L"DefaultUserName",
1009 0,
1010 REG_SZ,
1011 (LPBYTE)szAdministratorName,
1012 (wcslen(szAdministratorName)+ 1) * sizeof(WCHAR));
1013 if (lError != ERROR_SUCCESS)
1014 {
1015 DPRINT1("RegSetValueEx(\"DefaultUserName\") failed!\n");
1016 }
1017
1019
1020 return TRUE;
1021}
#define IDS_ADMINISTRATOR_NAME
Definition: resource.h:140

Referenced by ComputerPageDlgProc().

◆ WriteOwnerSettings()

static BOOL WriteOwnerSettings ( WCHAR OwnerName,
WCHAR OwnerOrganization 
)
static

Definition at line 752 of file wizard.c.

754{
755 HKEY hKey;
756 LONG res;
757
759 L"Software\\Microsoft\\Windows NT\\CurrentVersion",
760 0,
762 &hKey);
763
764 if (res != ERROR_SUCCESS)
765 {
766 return FALSE;
767 }
768
770 L"RegisteredOwner",
771 0,
772 REG_SZ,
773 (LPBYTE)OwnerName,
774 (wcslen(OwnerName) + 1) * sizeof(WCHAR));
775
776 if (res != ERROR_SUCCESS)
777 {
779 return FALSE;
780 }
781
783 L"RegisteredOrganization",
784 0,
785 REG_SZ,
786 (LPBYTE)OwnerOrganization,
787 (wcslen(OwnerOrganization) + 1) * sizeof(WCHAR));
788
790 return (res == ERROR_SUCCESS);
791}

Referenced by OwnerPageDlgProc().

◆ WriteUserLocale()

static VOID WriteUserLocale ( VOID  )
static

Definition at line 1454 of file wizard.c.

1455{
1456 HKEY hKey;
1457 LCID lcid;
1458 WCHAR Locale[12];
1459
1460 lcid = GetSystemDefaultLCID();
1461
1462 if (GetLocaleInfoW(MAKELCID(lcid, SORT_DEFAULT), LOCALE_ILANGUAGE, Locale, ARRAYSIZE(Locale)) != 0)
1463 {
1464 if (RegCreateKeyExW(HKEY_CURRENT_USER, L"Control Panel\\International",
1467 {
1468 RegSetValueExW(hKey, L"Locale", 0, REG_SZ, (LPBYTE)Locale, (wcslen(Locale) + 1) * sizeof(WCHAR));
1470 }
1471 }
1472}
LCID WINAPI GetSystemDefaultLCID(void)
Definition: locale.c:1230
#define SORT_DEFAULT
#define MAKELCID(lgid, srtid)
DWORD LCID
Definition: nls.h:13
#define LOCALE_ILANGUAGE
Definition: winnls.h:25

Referenced by LocalePageDlgProc().

Variable Documentation

◆ s_DefaultSoundEvents

const WCHAR* s_DefaultSoundEvents[][2]
static
Initial value:
=
{
{ L".Default", L"%SystemRoot%\\Media\\ReactOS_Default.wav" },
{ L"AppGPFault", L"" },
{ L"Close", L"" },
{ L"CriticalBatteryAlarm", L"%SystemRoot%\\Media\\ReactOS_Battery_Critical.wav" },
{ L"DeviceConnect", L"%SystemRoot%\\Media\\ReactOS_Hardware_Insert.wav" },
{ L"DeviceDisconnect", L"%SystemRoot%\\Media\\ReactOS_Hardware_Remove.wav" },
{ L"DeviceFail", L"%SystemRoot%\\Media\\ReactOS_Hardware_Fail.wav" },
{ L"LowBatteryAlarm", L"%SystemRoot%\\Media\\ReactOS_Battery_Low.wav" },
{ L"MailBeep", L"%SystemRoot%\\Media\\ReactOS_Notify.wav" },
{ L"Maximize", L"%SystemRoot%\\Media\\ReactOS_Restore.wav" },
{ L"MenuCommand", L"%SystemRoot%\\Media\\ReactOS_Menu_Command.wav" },
{ L"MenuPopup", L"" },
{ L"Minimize", L"%SystemRoot%\\Media\\ReactOS_Minimize.wav" },
{ L"Open", L"" },
{ L"PrintComplete", L"%SystemRoot%\\Media\\ReactOS_Print_Complete.wav" },
{ L"RestoreDown", L"" },
{ L"RestoreUp", L"" },
{ L"SystemAsterisk", L"%SystemRoot%\\Media\\ReactOS_Ding.wav" },
{ L"SystemExclamation", L"%SystemRoot%\\Media\\ReactOS_Exclamation.wav" },
{ L"SystemExit", L"%SystemRoot%\\Media\\ReactOS_Shutdown.wav" },
{ L"SystemHand", L"%SystemRoot%\\Media\\ReactOS_Critical_Stop.wav" },
{ L"SystemNotification", L"%SystemRoot%\\Media\\ReactOS_Balloon.wav" },
{ L"SystemQuestion", L"%SystemRoot%\\Media\\ReactOS_Ding.wav" },
{ L"SystemStart", L"%SystemRoot%\\Media\\ReactOS_Startup.wav" },
{ L"WindowsLogoff", L"%SystemRoot%\\Media\\ReactOS_LogOff.wav" }
}

Definition at line 403 of file wizard.c.

Referenced by DoWriteProductOption().

◆ s_ExplorerSoundEvents

const WCHAR* s_ExplorerSoundEvents[][2]
static
Initial value:
=
{
{ L"EmptyRecycleBin", L"%SystemRoot%\\Media\\ReactOS_Recycle.wav" },
{ L"Navigating", L"%SystemRoot%\\Media\\ReactOS_Start.wav" }
}

Definition at line 433 of file wizard.c.

Referenced by DoWriteProductOption().

◆ s_ProductOptionData

const PRODUCT_OPTION_DATA s_ProductOptionData[]
static
Initial value:
=
{
{ L"Terminal Server\0", L"ServerNT", 0, 0x200, 0 },
{ L"\0", L"WinNT", 1, 0x300, 1 }
}

Definition at line 397 of file wizard.c.

Referenced by DoWriteProductOption(), and OnChooseOption().

◆ s_szControlWindows

const WCHAR s_szControlWindows[] = L"SYSTEM\\CurrentControlSet\\Control\\Windows"
static

Definition at line 383 of file wizard.c.

Referenced by DoWriteProductOption().

◆ s_szDefaultSoundEvents

const WCHAR s_szDefaultSoundEvents[] = L"AppEvents\\Schemes\\Apps\\.Default"
static

Definition at line 385 of file wizard.c.

Referenced by DoWriteProductOption().

◆ s_szExplorerSoundEvents

const WCHAR s_szExplorerSoundEvents[] = L"AppEvents\\Schemes\\Apps\\Explorer"
static

Definition at line 386 of file wizard.c.

Referenced by DoWriteProductOption().

◆ s_szProductOptions

const WCHAR s_szProductOptions[] = L"SYSTEM\\CurrentControlSet\\Control\\ProductOptions"
static

Definition at line 381 of file wizard.c.

Referenced by DoWriteProductOption().

◆ s_szRosVersion

const WCHAR s_szRosVersion[] = L"SYSTEM\\CurrentControlSet\\Control\\ReactOS\\Settings\\Version"
static

Definition at line 382 of file wizard.c.

Referenced by DoWriteProductOption().

◆ s_szWinlogon

const WCHAR s_szWinlogon[] = L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon"
static

Definition at line 384 of file wizard.c.

Referenced by DoWriteProductOption().

◆ Themes

struct ThemeInfo Themes[]
static
Initial value:
= {
{ MAKEINTRESOURCE(IDB_LAUTUS), IDS_LAUTUS, L"themes\\lautus\\lautus.msstyles" },
{ MAKEINTRESOURCE(IDB_LUNAR), IDS_LUNAR, L"themes\\lunar\\lunar.msstyles" },
{ MAKEINTRESOURCE(IDB_MIZU), IDS_MIZU, L"themes\\mizu\\mizu.msstyles"},
}
#define IDS_LAUTUS
Definition: resource.h:162
#define IDB_LUNAR
Definition: resource.h:25
#define IDB_MIZU
Definition: resource.h:26
#define IDS_CLASSIC
Definition: resource.h:161
#define IDS_LUNAR
Definition: resource.h:163
#define IDS_MIZU
Definition: resource.h:164
#define IDB_LAUTUS
Definition: resource.h:24
#define IDB_CLASSIC
Definition: resource.h:23

Referenced by ThemePageDlgProc().