128 HRSRC GplTextResource;
139 if (
NULL == GplTextResource)
154 if (
NULL == GplTextMem)
160 if (
NULL == GplTextLocked)
166 GplText[
Size] =
'\0';
230 (
WPARAM)pSetupData->hTitleFont,
294 PWCHAR End, CurrentProject;
295 INT ProjectsSize, ProjectsCount;
312 if (
NULL == Projects)
317 if (0 == ProjectsCount)
322 if (ProjectsCount < ProjectsSize - 1)
330 CurrentProject = Projects;
331 while (*CurrentProject !=
L'\0')
333 End =
wcschr(CurrentProject,
L'\n');
341 CurrentProject = End + 1;
345 CurrentProject +=
wcslen(CurrentProject);
412 {
L"Terminal Server\0",
L"ServerNT", 0, 0x200, 0 },
413 {
L"\0",
L"WinNT", 1, 0x300, 1 },
414 {
L"Terminal Server\0",
L"ServerNT", 0, 0x200, 0 }
428 {
L".Default",
L"%SystemRoot%\\Media\\ReactOS_Default.wav" },
429 {
L"AppGPFault",
L"" },
431 {
L"CriticalBatteryAlarm",
L"%SystemRoot%\\Media\\ReactOS_Battery_Critical.wav" },
432 {
L"DeviceConnect",
L"%SystemRoot%\\Media\\ReactOS_Hardware_Insert.wav" },
433 {
L"DeviceDisconnect",
L"%SystemRoot%\\Media\\ReactOS_Hardware_Remove.wav" },
434 {
L"DeviceFail",
L"%SystemRoot%\\Media\\ReactOS_Hardware_Fail.wav" },
435 {
L"LowBatteryAlarm",
L"%SystemRoot%\\Media\\ReactOS_Battery_Low.wav" },
436 {
L"MailBeep",
L"%SystemRoot%\\Media\\ReactOS_Notify.wav" },
437 {
L"Maximize",
L"%SystemRoot%\\Media\\ReactOS_Restore.wav" },
438 {
L"MenuCommand",
L"%SystemRoot%\\Media\\ReactOS_Menu_Command.wav" },
439 {
L"MenuPopup",
L"" },
440 {
L"Minimize",
L"%SystemRoot%\\Media\\ReactOS_Minimize.wav" },
442 {
L"PrintComplete",
L"%SystemRoot%\\Media\\ReactOS_Print_Complete.wav" },
443 {
L"RestoreDown",
L"" },
444 {
L"RestoreUp",
L"" },
445 {
L"SystemAsterisk",
L"%SystemRoot%\\Media\\ReactOS_Ding.wav" },
446 {
L"SystemExclamation",
L"%SystemRoot%\\Media\\ReactOS_Exclamation.wav" },
447 {
L"SystemExit",
L"%SystemRoot%\\Media\\ReactOS_Shutdown.wav" },
448 {
L"SystemHand",
L"%SystemRoot%\\Media\\ReactOS_Critical_Stop.wav" },
449 {
L"SystemNotification",
L"%SystemRoot%\\Media\\ReactOS_Balloon.wav" },
450 {
L"SystemQuestion",
L"%SystemRoot%\\Media\\ReactOS_Ding.wav" },
451 {
L"SystemStart",
L"%SystemRoot%\\Media\\ReactOS_Startup.wav" },
452 {
L"WindowsLogoff",
L"%SystemRoot%\\Media\\ReactOS_LogOff.wav" }
458 {
L"EmptyRecycleBin",
L"%SystemRoot%\\Media\\ReactOS_Recycle.wav" },
459 {
L"Navigating",
L"%SystemRoot%\\Media\\ReactOS_Start.wav" }
468 HKEY hRootKey, hEventKey, hDefaultKey;
479 DPRINT1(
"RegOpenKeyExW failed\n");
559 DPRINT1(
"RegOpenKeyExW failed\n");
564 pszData =
pData->ProductSuite;
569 DPRINT1(
"RegSetValueExW failed\n");
574 pszData =
pData->ProductType;
579 DPRINT1(
"RegSetValueExW failed\n");
589 DPRINT1(
"RegOpenKeyExW failed\n");
594 dwValue =
pData->ReportAsWorkstation;
599 DPRINT1(
"RegSetValueExW failed\n");
609 DPRINT1(
"RegOpenKeyExW failed\n");
614 dwValue =
pData->CSDVersion;
619 DPRINT1(
"RegSetValueExW failed\n");
629 DPRINT1(
"RegOpenKeyExW failed\n");
634 dwValue =
pData->LogonType;
639 DPRINT1(
"RegSetValueExW failed\n");
653 WCHAR szShell[] =
L"cmd.exe";
658 DPRINT1(
"RegSetValueExW failed\n");
667 DPRINT1(
"RegOpenKeyExW failed\n");
675 DPRINT1(
"RegSetValueExW failed\n");
723 WCHAR szText[64], szDefault[64];
831 WCHAR * OwnerOrganization)
837 L"Software\\Microsoft\\Windows NT\\CurrentVersion",
861 L"RegisteredOrganization",
864 (
LPBYTE)OwnerOrganization,
878 WCHAR OwnerOrganization[51];
880 WCHAR ErrorName[256];
942 wcscpy(ErrorName,
L"Setup cannot continue until you enter your name.");
952 OwnerOrganization[0] = 0;
984 WCHAR ErrorComputerName[256];
999 wcscpy(ErrorComputerName,
L"Setup failed to set the computer name.");
1018 L"SYSTEM\\CurrentControlSet\\Services\\Tcpip\\Parameters",
1036 DPRINT1(
"RegSetValueEx(\"Hostname\") failed (%08lX)\n", lError);
1043 DPRINT1(
"RegCreateKeyExW for Tcpip\\Parameters failed (%08lX)\n", lError);
1054 WCHAR szAdministratorName[256];
1060 szAdministratorName,
1063 wcscpy(szAdministratorName,
L"Administrator");
1067 L"SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon",
1075 L"DefaultDomainName",
1082 DPRINT1(
"RegSetValueEx(\"DefaultDomainName\") failed!\n");
1089 (
LPBYTE)szAdministratorName,
1090 (
wcslen(szAdministratorName)+ 1) *
sizeof(
WCHAR));
1093 DPRINT1(
"RegSetValueEx(\"DefaultUserName\") failed!\n");
1106 static const WCHAR Chars[] =
L"0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ";
1107 static const unsigned cChars =
sizeof(Chars) /
sizeof(
WCHAR) - 1;
1115 for (
i = 8;
i < 15;
i++)
1128 WCHAR Password1[128];
1129 WCHAR Password2[128];
1132 WCHAR EmptyComputerName[256], NotMatchPassword[256], WrongPassword[256];
1162 if (pSetupData->UnattendSetup)
1165 if (pSetupData->ComputerName[0] ==
L'*' && !pSetupData->ComputerName[1])
1166 wcscpy(pSetupData->ComputerName, ComputerName);
1202 wcscpy(EmptyComputerName,
L"Setup cannot continue until you enter the name of your computer.");
1220#ifdef PASSWORDS_MANDATORY
1228 wcscpy(EmptyPassword,
L"You must enter a password !");
1239 if (
wcscmp(Password1, Password2))
1244 wcscpy(NotMatchPassword,
L"The passwords you entered do not match. Please enter the desired password again.");
1260 wcscpy(WrongPassword,
L"The password you entered contains invalid characters. Please enter a cleaned password.");
1274 pSetupData->UnattendSetup =
FALSE;
1294 WCHAR CurLocale[256] =
L"";
1296 WCHAR ResText[256] =
L"";
1297 WCHAR LocaleText[256 * 2];
1313 WCHAR LayoutPath[256];
1315 WCHAR SpecialId[5] =
L"";
1316 WCHAR ResText[256] =
L"";
1331 LayoutSpecial =
TRUE;
1334#define MAX_LAYOUTS_PER_LANGID 0x10000
1353 if (!LayoutSpecial ||
1381#undef MAX_LAYOUTS_PER_LANGID
1399 if (!pwszCPLParameters)
1405 ZeroMemory(&StartupInfo,
sizeof(StartupInfo));
1406 StartupInfo.
cb =
sizeof(StartupInfo);
1407 ZeroMemory(&ProcessInformation,
sizeof(ProcessInformation));
1421 &ProcessInformation))
1475 else if (
_wcsicmp(pszExt,
L".msstyles") == 0)
1480 DPRINT1(
"EnableVisualTheme(): Unknown file '%S'\n", ThemeFile);
1485 DPRINT1(
"Applying visual %s '%S'\n",
1487 ThemeFile ? ThemeFile :
L"(Classic)");
1503 szStyleFile,
_countof(szStyleFile), ThemeFile) && *szStyleFile)
1506 ThemeFile = szStyleFile;
1515 DPRINT1(
"--> Applying visual style '%S'\n",
1516 ThemeFile ? ThemeFile :
L"(Classic)");
1521 WCHAR wszParams[1024];
1523 PCWSTR format =
L"desk.cpl,,2 /Action:ActivateMSTheme /file:\"%s\"";
1540 WCHAR Locale[9] =
L"0000";
1667 ULONG DescriptionSize;
1668 ULONG StandardNameSize;
1669 ULONG DaylightNameSize;
1677 DescriptionSize =
sizeof(
Entry->Description);
1678 StandardNameSize =
sizeof(
Entry->StandardName);
1679 DaylightNameSize =
sizeof(
Entry->DaylightName);
1683 &
Entry->TimezoneInfo,
1686 Entry->StandardName,
1688 Entry->DaylightName,
1707 if (Current !=
NULL)
1721 Entry->Next = Current;
1772 return (
Entry->TimezoneInfo.StandardDate.wMonth != 0 &&
1773 Entry->TimezoneInfo.DaylightDate.wMonth != 0);
1783 if (
Entry->Index == dwEntryIndex)
1831 if (dwEntryIndex != 0 && dwEntryIndex ==
Entry->Index)
1869 Entry->StandardName);
1871 Entry->DaylightName);
1873 TimeZoneInformation.
Bias =
Entry->TimezoneInfo.Bias;
1878 &
Entry->TimezoneInfo.StandardDate,
1881 &
Entry->TimezoneInfo.DaylightDate,
1945 WCHAR ErrorLocalTime[256];
1962 wcscpy(ErrorLocalTime,
L"Setup was unable to set the local time.");
2016 dwEntryIndex = (
DWORD)-1;
2151 WCHAR DisplayName[100] = {0};
2163 lvi.pszText = DisplayName;
2185 int iTheme = pnmv->
iItem;
2186 DPRINT1(
"Selected theme: %u\n",
Themes[iTheme].DisplayName);
2188 if (
Themes[iTheme].ThemeFile)
2257 DPRINT(
"Received SPFILENOTIFY_STARTREGISTRATION notification for %S\n",
2266 DPRINT(
"Received SPFILENOTIFY_ENDREGISTRATION notification for %S\n",
2331 WCHAR SectionName[512];
2337 RegistrationData.
hwndDlg = pItemsData->hwndDlg;
2343 DPRINT1(
"No RegistrationPhase2 section found\n");
2351 DPRINT1(
"Unable to retrieve section name\n");
2356 DPRINT(
"SectionName %S DllCount %ld\n", SectionName, DllCount);
2364 RegistrationData.
pNotify = pNotify;
2370 L"RegistrationPhase2",
2385 DPRINT(
"Catching exception\n");
2400 WCHAR SectionName[512];
2412 DPRINT1(
"No RegistrationPhase2 section found\n");
2420 DPRINT1(
"Unable to retrieve section name\n");
2430 DPRINT(
"Register Components: %ld Steps\n", Steps);
2438 DPRINT(
"Register Components: done\n");
2457 DPRINT(
"Install security: %ld Steps\n", Steps);
2464 DPRINT(
"Install security: done\n");
2478 hwndDlg = pItemsData->
hwndDlg;
2513 HANDLE hCompletionThread;
2517 if (pItemsData ==
NULL)
2520 pItemsData->
hwndDlg = hwndDlg;
2528 if (hCompletionThread ==
NULL)
2548 WCHAR UnknownError[84];
2558 wcscpy(UnknownError,
L"Unknown error");
2561 _ultow(LastError, UnknownError +
wcslen(UnknownError), 10);
2631 static HICON s_hCheckIcon, s_hArrowIcon, s_hCrossIcon;
2632 static HFONT s_hNormalFont;
2711 DPRINT(
"PM_STEP_START\n");
2728 DPRINT(
"PM_ITEMS_DONE\n");
2746 DWORD InProgress = 0;
2760 L"Software\\Microsoft\\Windows NT\\CurrentVersion",
2881 WCHAR wszDrives[512];
2882 WCHAR wszNTPath[512];
2889 if (cchDrives == 0 || cchDrives >=
_countof(wszDrives))
2896 for (pwszDrive = wszDrives; *pwszDrive; pwszDrive +=
wcslen(pwszDrive) + 1)
2903 pwszDrive[2] =
L'\\';
2908 wsprintf(wszBuf,
L"Testing '%s' --> '%s' %s a CD",
2909 pwszDrive, wszNTPath,
2914 if (!
_wcsicmp(wszNTPath, pwszNTPath))
2917 wcscpy(pwszPath, pwszDrive);
2920 wsprintf(wszBuf,
L"GetInstallSourceWin32: %s", pwszPath);
2944 L"UnattendSetupEnabled",
2963 DPRINT(
"Unattend setup was disabled by UnattendSetupEnabled key.\n");
2967 pSetupData->UnattendSetup =
TRUE;
3002 if (
ARRAYSIZE(pSetupData->OwnerName) > LineLength)
3004 wcscpy(pSetupData->OwnerName, szValue);
3009 if (
ARRAYSIZE(pSetupData->OwnerOrganization) > LineLength)
3011 wcscpy(pSetupData->OwnerOrganization, szValue);
3016 if (
ARRAYSIZE(pSetupData->ComputerName) > LineLength)
3018 wcscpy(pSetupData->ComputerName, szValue);
3023 if (
ARRAYSIZE(pSetupData->AdminPassword) > LineLength)
3025 wcscpy(pSetupData->AdminPassword, szValue);
3030 pSetupData->TimeZoneIndex =
_wtoi(szValue);
3034 pSetupData->DisableAutoDaylightTimeSet =
_wtoi(szValue);
3039 pSetupData->RappsDownload =
TRUE;
3041 pSetupData->RappsDownload =
FALSE;
3080 iValue =
_wtoi(szValue);
3113 L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce",
3118 DPRINT1(
"Error: failed to open HKLM\\Software\\Microsoft\\Windows\\CurrentVersion\\RunOnce\n");
3168 DPRINT1(
"Error: failed to open HKLM\\SYSTEM\\CurrentControlSet\\Control\\Session Manager\\Environment\n");
3230 return (
_wcsicmp(szPath1, szPath2) == 0);
3240 DWORD dwPathLength = 0;
3241 DWORD dwNewLength = 0;
3247 L"Installation Sources",
3255 dwPathLength == 0 ||
3256 dwPathLength %
sizeof(
WCHAR) != 0)
3263 dwNewLength = dwPathLength + (
wcslen(lpPath) + 1) *
sizeof(
WCHAR);
3272 L"Installation Sources",
3299 if (dwPathLength == 0)
3301 dwNewLength = (
wcslen(lpPath) + 1 + 1) *
sizeof(
WCHAR);
3314 L"Installation Sources",
3389 _swprintf(szValue,
L"\"%s\"", pSetupData->SourcePath);
3401 L"Software\\Microsoft\\Windows NT\\CurrentVersion",
3413 L"Software\\Microsoft\\Windows\\CurrentVersion\\Setup",
3428 (
LPBYTE)pSetupData->SourcePath,
3429 (
wcslen(pSetupData->SourcePath) + 1) *
sizeof(
WCHAR));
3432 L"ServicePackSourcePath",
3435 (
LPBYTE)pSetupData->SourcePath,
3436 (
wcslen(pSetupData->SourcePath) + 1) *
sizeof(
WCHAR));
3471 DWORD dwPageCount = 10, dwNetworkPageCount = 0;
3473 LogItem(
L"BEGIN_SECTION",
L"InstallWizard");
3479 if (pSetupData ==
NULL)
3483 L"Setup failed to allocate global data!",
3491 if (hNetShell !=
NULL)
3493 DPRINT(
"Netshell.dll loaded!\n");
3496 "NetSetupRequestWizardPages");
3499 pfn(&dwNetworkPageCount,
NULL,
NULL);
3500 dwPageCount += dwNetworkPageCount;
3504 DPRINT(
"PageCount: %lu\n", dwPageCount);
3513 L"Setup failed to allocate page array!",
3526 psp.lParam = (
LPARAM)pSetupData;
3532 psp.dwFlags =
PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3540 psp.dwFlags =
PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3548 psp.dwFlags =
PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3556 psp.dwFlags =
PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3564 psp.dwFlags =
PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3572 psp.dwFlags =
PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3580 psp.dwFlags =
PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3592 pfn(&dwNetworkPageCount, &phpage[nPages], pSetupData);
3593 nPages += dwNetworkPageCount;
3597 psp.dwFlags =
PSP_DEFAULT | PSP_USEHEADERTITLE | PSP_USEHEADERSUBTITLE;
3610 ASSERT(nPages == dwPageCount);
3614 psh.dwFlags = PSH_WIZARD97 | PSH_WATERMARK | PSH_HEADER |
PSH_MODELESS;
3616 psh.hwndParent =
NULL;
3617 psh.nPages = nPages;
3619 psh.phpage = phpage;
3650 if (hNetShell !=
NULL)
3653 if (pSetupData !=
NULL)
3656 LogItem(
L"END_SECTION",
L"InstallWizard");
static _In_ LPCWSTR LocaleName
PRTL_UNICODE_STRING_BUFFER Path
static VOID ErrorMessage(_In_ DWORD dwErrorCode, _In_opt_ PCWSTR pszMsg,...)
#define ShowDlgItem(hDlg, nID, nCmdShow)
struct _SETUPDATA * PSETUPDATA
#define IDS_PROCESSSUBTITLE
#define IDC_PROCESSPROGRESS
#define IDC_RESTART_PROGRESS
#define RegCloseKey(hKey)
static HINSTANCE hDllInstance
BOOL WINAPI SetComputerNameW(LPCWSTR lpComputerName)
BOOL WINAPI SetComputerNameExW(COMPUTER_NAME_FORMAT NameType, LPCWSTR lpBuffer)
#define ERROR_NOT_ENOUGH_MEMORY
static CHAR Title[MAX_PATH]
BOOL WINAPI SHIM_OBJ_NAME() Notify(DWORD fdwReason, PVOID ptr)
#define IDS_REACTOS_SETUP
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)
LONG WINAPI RegOpenKeyExW(HKEY hKey, LPCWSTR lpSubKey, DWORD ulOptions, REGSAM samDesired, PHKEY phkResult)
LONG WINAPI RegSetValueExW(_In_ HKEY hKey, _In_ LPCWSTR lpValueName, _In_ DWORD Reserved, _In_ DWORD dwType, _In_ CONST BYTE *lpData, _In_ DWORD cbData)
LONG WINAPI RegQueryValueExW(_In_ HKEY hkeyorg, _In_ LPCWSTR name, _In_ LPDWORD reserved, _In_ LPDWORD type, _In_ LPBYTE data, _In_ LPDWORD count)
INT WINAPI ImageList_AddMasked(HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
#define GetProcAddress(x, y)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
static void cleanup(void)
#define IDS_UNKNOWN_ERROR
DWORD WINAPI QueryDosDeviceW(LPCWSTR lpDeviceName, LPWSTR lpTargetPath, DWORD ucchMax)
DWORD WINAPI ExpandEnvironmentStringsW(IN LPCWSTR lpSrc, IN LPWSTR lpDst, IN DWORD nSize)
UINT WINAPI GetDriveTypeW(IN LPCWSTR lpRootPathName)
DWORD WINAPI GetLogicalDriveStringsW(IN DWORD nBufferLength, IN LPWSTR lpBuffer)
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
UINT WINAPI GetSystemDirectoryW(OUT LPWSTR lpBuffer, IN UINT uSize)
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)
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)
BOOL WINAPI SetLocalTime(IN CONST SYSTEMTIME *lpSystemTime)
VOID WINAPI GetLocalTime(OUT LPSYSTEMTIME lpSystemTime)
BOOL WINAPI WritePrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR string, LPCWSTR filename)
INT WINAPI GetPrivateProfileStringW(LPCWSTR section, LPCWSTR entry, LPCWSTR def_val, LPWSTR buffer, UINT len, LPCWSTR filename)
HRSRC WINAPI FindResourceW(HINSTANCE hModule, LPCWSTR name, LPCWSTR type)
DWORD WINAPI SizeofResource(HINSTANCE hModule, HRSRC hRsrc)
LPVOID WINAPI LockResource(HGLOBAL handle)
HGLOBAL WINAPI LoadResource(HINSTANCE hModule, HRSRC hRsrc)
BOOL WINAPI SetTimeZoneInformation(CONST TIME_ZONE_INFORMATION *lpTimeZoneInformation)
GEOID WINAPI GetUserGeoID(GEOCLASS GeoClass)
LCID WINAPI GetThreadLocale(void)
INT WINAPI GetGeoInfoW(GEOID geoid, GEOTYPE geotype, LPWSTR data, int data_len, LANGID lang)
LCID WINAPI GetUserDefaultLCID(void)
LCID WINAPI GetSystemDefaultLCID(void)
INT WINAPI GetLocaleInfoW(LCID lcid, LCTYPE lctype, LPWSTR buffer, INT len)
ULONG WINAPI DECLSPEC_HOTPATCH GetTickCount(void)
_ACRTIMP wchar_t *__cdecl _ultow(__msvcrt_ulong, wchar_t *, int)
_ACRTIMP int __cdecl _wtoi(const wchar_t *)
_ACRTIMP int __cdecl _wcsicmp(const wchar_t *, const wchar_t *)
_ACRTIMP size_t __cdecl wcslen(const wchar_t *)
_ACRTIMP int __cdecl wcscmp(const wchar_t *, const wchar_t *)
_ACRTIMP int __cdecl rand(void)
_ACRTIMP void __cdecl srand(unsigned int)
static const WCHAR CmdLine[]
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)
static const WCHAR RegisterDlls[]
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
LONG WINAPI SetupGetLineCountW(HINF hinf, PCWSTR section)
void WINAPI SetupTermDefaultQueueCallback(PVOID context)
PVOID WINAPI SetupInitDefaultQueueCallback(HWND owner)
HRESULT WINAPI SHGetFolderPathAndSubDirW(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPCWSTR pszSubPath, LPWSTR pszPath)
NTSTATUS SetAdministratorPassword(LPCWSTR Password)
struct _ITEMSDATA * PITEMSDATA
LONG CountSecuritySteps(VOID)
struct _REGISTRATIONNOTIFY * PREGISTRATIONNOTIFY
DWORD InstallSecurity(_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify)
BOOL RegisterTypeLibraries(_In_ PITEMSDATA pItemsData, _In_ PREGISTRATIONNOTIFY pNotify, _In_ HINF hinf, _In_ LPCWSTR szSection)
VOID InstallStartMenuItems(_In_ PITEMSDATA pItemsData)
#define IDS_THEMESELECTIONTITLE
#define IDC_OWNERORGANIZATION
#define IDS_INSTALLATIONSERVERINFO
#define IDS_INSTALLATIONSUBTITLE
#define IDC_INSTALLATION_ICON
#define IDS_LOCALESUBTITLE
#define IDS_INSTALLATIONWORKSTATIONNAME
#define IDC_INSTALLATION_TYPES
#define IDC_ADMINPASSWORD2
#define IDS_DLLINSTALL_FAILED
#define IDS_REGSVR_FAILED
#define IDS_WZD_COMPUTERNAME
#define IDC_INSTALLATION_DESCRIPTION
#define IDS_LOADLIBRARY_FAILED
#define IDS_OWNERSUBTITLE
#define IDS_GETPROCADDR_FAILED
#define IDS_WZD_PASSWORDMATCH
#define IDS_COMPUTERSUBTITLE
#define IDS_INSTALLATIONTITLE
#define IDS_WZD_PASSWORDCHAR
#define IDS_DATETIMESUBTITLE
#define IDS_THEMESELECTIONSUBTITLE
#define IDS_REASON_UNKNOWN
#define IDS_INSTALLATIONSERVERNAME
#define IDS_COMPUTERTITLE
#define IDS_WZD_LOCALTIME
#define IDS_MACHINE_OWNER_NAME
#define IDS_WZD_SETCOMPUTERNAME
#define IDS_WZD_PASSWORDEMPTY
#define IDS_INSTALLATIONSERVERCORENAME
#define IDC_ADMINPASSWORD1
#define IDS_INSTALLATIONWORKSTATIONINFO
#define IDS_DATETIMETITLE
#define IDS_ADMINISTRATOR_NAME
#define IDS_INSTALLATIONSERVERCOREINFO
NTSTATUS WINAPI SetAccountsDomainSid(PSID DomainSid, LPCWSTR DomainName)
#define EnableDlgItem(hDlg, nID, bEnable)
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
HLOCAL NTAPI LocalFree(HLOCAL hMem)
void WINAPI SHIM_OBJ_NAME() OutputDebugStringW(LPCWSTR lpOutputString)
#define EXCEPTION_EXECUTE_HANDLER
HRESULT Next([in] ULONG celt, [out, size_is(celt), length_is(*pceltFetched)] STATPROPSETSTG *rgelt, [out] ULONG *pceltFetched)
#define memcpy(s1, s2, n)
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
#define _swprintf(buf, format,...)
static PLARGE_INTEGER Time
static SCRIPT_CACHE SCRIPT_ANALYSIS OPENTYPE_TAG OPENTYPE_TAG int TEXTRANGE_PROPERTIES int const WCHAR int cChars
struct _PSP * HPROPSHEETPAGE
unsigned __int3264 UINT_PTR
INT WINAPI MulDiv(INT nNumber, INT nNumerator, INT nDenominator)
static HFONT CreateTitleFont(VOID)
static INT_PTR CALLBACK WelcomeDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
static INT_PTR CALLBACK FinishDlgProc(IN HWND hwndDlg, IN UINT uMsg, IN WPARAM wParam, IN LPARAM lParam)
static VOID CenterWindow(IN HWND hWnd)
#define REG_OPTION_NON_VOLATILE
#define FILE_ATTRIBUTE_DIRECTORY
#define MAKELCID(lgid, srtid)
#define MAKEINTRESOURCE(i)
#define PathCanonicalizeW
#define PathAddBackslashW
static const WCHAR szName[]
#define PropSheet_PressButton(d, i)
#define CreatePropertySheetPage
#define PropSheet_SetWizButtons(d, f)
#define ListView_InsertItem(hwnd, pitem)
#define ListView_SetIconSpacing(hwndLV, cx, cy)
#define ListView_SetImageList(hwnd, himl, iImageList)
#define ListView_SetBkColor(hwnd, clrBk)
#define DateTime_SetSystemtime(hdp, gd, pst)
#define DTN_DATETIMECHANGE
struct tagNMLISTVIEW * LPNMLISTVIEW
#define ListView_SetTextBkColor(hwnd, clrTextBk)
#define DateTime_GetSystemtime(hdp, pst)
_In_opt_ _In_opt_ _In_ _In_ DWORD cbData
#define _SEH2_GetExceptionCode()
#define _SEH2_EXCEPT(...)
NTSTATUS NTAPI RtlCreateBootStatusDataFile(VOID)
#define SPREG_GETPROCADDR
#define SetupDefaultQueueCallback
#define SPFILENOTIFY_STARTREGISTRATION
struct _SP_REGISTER_CONTROL_STATUSW * PSP_REGISTER_CONTROL_STATUSW
#define SPFILENOTIFY_ENDREGISTRATION
#define SPREG_LOADLIBRARY
STDMETHOD() Next(THIS_ ULONG celt, IAssociationElement *pElement, ULONG *pceltFetched) PURE
STRSAFEAPI StringCchPrintfW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszFormat,...)
STRSAFEAPI StringCchCatW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
WCHAR lfFaceName[LF_FACESIZE]
DWORD ReportAsWorkstation
PREGISTRATIONNOTIFY pNotify
INSTALLATION_TYPE InstallationType
struct _TIMEZONE_ENTRY * TimeZoneListHead
UINT uPostNetworkWizardPage
struct _TIMEZONE_ENTRY * TimeZoneListTail
UINT uFirstNetworkWizardPage
WCHAR OwnerOrganization[51]
DWORD DisableAutoDaylightTimeSet
REG_TZI_FORMAT TimezoneInfo
struct _TIMEZONE_ENTRY * Prev
struct _TIMEZONE_ENTRY * Next
static BOOL WriteOwnerSettings(WCHAR *OwnerName, WCHAR *OwnerOrganization)
static VOID RegisterComponents(PITEMSDATA pItemsData)
static const WCHAR * s_ExplorerSoundEvents[][2]
static INT_PTR CALLBACK GplDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static BOOL DoWriteSoundEvents(HKEY hKey, LPCWSTR lpSubkey, LPCWSTR lpEventsArray[][2], DWORD dwSize)
struct _PRODUCT_OPTION_DATA PRODUCT_OPTION_DATA
static VOID ShowItemError(HWND hwndDlg, DWORD LastError)
struct _REGISTRATIONDATA REGISTRATIONDATA
static BOOL GetInstallSourceWin32(OUT PWSTR pwszPath, IN DWORD cchPathMax, IN PCWSTR pwszNTPath)
static const WCHAR s_szRosVersion[]
static BOOL RunItemCompletionThread(_In_ HWND hwndDlg)
static UINT CALLBACK RegistrationNotificationProc(PVOID Context, UINT Notification, UINT_PTR Param1, UINT_PTR Param2)
static VOID CreateTimeZoneList(PSETUPDATA SetupData)
static VOID SetKeyboardLayoutName(HWND hwnd)
static BOOL SetSystemLocalTime(HWND hwnd, PSETUPDATA SetupData)
static VOID WriteUserLocale(VOID)
static INT_PTR CALLBACK ComputerPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static BOOL PathIsEqual(IN LPCWSTR lpPath1, IN LPCWSTR lpPath2)
static VOID UpdateLocalSystemTime(HWND hwnd, SYSTEMTIME LocalTime)
static INT_PTR CALLBACK LocalePageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
VOID EnableVisualTheme(_In_opt_ HWND hwndParent, _In_opt_ PCWSTR ThemeFile)
static BOOL WriteDefaultLogonData(LPWSTR Domain)
static void GenerateComputerName(LPWSTR lpBuffer)
static PTIMEZONE_ENTRY GetLargerTimeZoneEntry(PSETUPDATA SetupData, DWORD Index)
static VOID SetUserLocaleName(HWND hwnd)
static INT_PTR CALLBACK OwnerPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static BOOL WriteDateTimeSettings(HWND hwndDlg, PSETUPDATA SetupData)
#define MAX_LAYOUTS_PER_LANGID
static INT_PTR CALLBACK DateTimePageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static const WCHAR * InstallationTypes[INSTALLATION_TYPE_MAX]
static HFONT CreateBoldFont(VOID)
static BOOL WriteComputerSettings(WCHAR *ComputerName, HWND hwndDlg)
VOID ProcessSetupInf(IN OUT PSETUPDATA pSetupData)
static VOID ShowStepError(HWND hwndDlg, PREGISTRATIONNOTIFY RegistrationNotify)
static const WCHAR s_szWinlogon[]
static VOID DestroyTimeZoneList(PSETUPDATA SetupData)
static const PRODUCT_OPTION_DATA s_ProductOptionData[INSTALLATION_TYPE_MAX]
static const WCHAR * s_DefaultSoundEvents[][2]
static BOOL GetLocalSystemTime(HWND hwnd, PSETUPDATA SetupData)
static void OnChooseInstallationType(HWND hwndDlg, INSTALLATION_TYPE nOption)
static LONG RetrieveTimeZone(IN HKEY hZoneKey, IN PVOID Context)
static struct ThemeInfo Themes[]
DWORD(WINAPI * PFNREQUESTWIZARDPAGES)(PDWORD, HPROPSHEETPAGE *, PSETUPDATA)
static PTIMEZONE_ENTRY GetSelectedTimeZoneEntry(PSETUPDATA SetupData, DWORD dwEntryIndex)
static PTIMEZONE_ENTRY GetTimeZoneEntryByIndex(PSETUPDATA SetupData, DWORD dwComboIndex)
void WINAPI Control_RunDLLW(HWND hWnd, HINSTANCE hInst, LPCWSTR cmd, DWORD nCmdShow)
struct _REGISTRATIONDATA * PREGISTRATIONDATA
static VOID SetLocalTimeZone(HWND hwnd, PSETUPDATA SetupData)
static INT_PTR CALLBACK ThemePageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static INT_PTR CALLBACK AckPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static BOOL HasDaylightSavingTime(PTIMEZONE_ENTRY Entry)
static DWORD CALLBACK ItemCompletionThread(LPVOID Parameter)
static BOOL RunControlPanelApplet(HWND hwnd, PCWSTR pwszCPLParameters)
static const WCHAR s_szCurrentVersion[]
static VOID SetInstallationCompleted(VOID)
static VOID AddInstallationSource(IN HKEY hKey, IN LPWSTR lpPath)
struct _TIMEZONE_ENTRY * PTIMEZONE_ENTRY
static const WCHAR s_szExplorerSoundEvents[]
static INT_PTR CALLBACK InstallTypePageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
VOID ProcessUnattendSection(IN OUT PSETUPDATA pSetupData)
static BOOL DoWriteInstallationType(INSTALLATION_TYPE nOption)
static VOID UpdateAutoDaylightCheckbox(HWND hwndDlg, PTIMEZONE_ENTRY Entry)
struct _TIMEZONE_ENTRY TIMEZONE_ENTRY
static const WCHAR s_szProductOptions[]
static const WCHAR s_szControlWindows[]
static VOID ShowTimeZoneList(HWND hwnd, PSETUPDATA SetupData, DWORD dwEntryIndex)
static INT_PTR CALLBACK ProcessPageDlgProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM lParam)
static const WCHAR s_szDefaultSoundEvents[]
#define LogItem(lpTag, lpMessageText...)
@ INSTALLATION_TYPE_SERVER_CORE
@ INSTALLATION_TYPE_DEFAULT
@ INSTALLATION_TYPE_SERVER
@ INSTALLATION_TYPE_WORKSTATION
enum _INSTALLATION_TYPE INSTALLATION_TYPE
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
TW_UINT32 TW_UINT16 TW_UINT16 MSG
VOID EnumerateTimeZoneList(IN PENUM_TIMEZONE_CALLBACK Callback, IN PVOID Context OPTIONAL)
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)
VOID SetAutoDaylight(IN BOOL EnableAutoDaylightTime)
BOOL GetTimeZoneListIndex(IN OUT PULONG pIndex)
BOOL WINAPI SetupGetStringFieldW(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT PWSTR ReturnBuffer, IN ULONG ReturnBufferSize, OUT PULONG RequiredSize)
BOOL WINAPI SetupFindFirstLineW(IN HINF InfHandle, IN PCWSTR Section, IN PCWSTR Key, IN OUT PINFCONTEXT Context)
BOOL WINAPI SetupFindNextLine(IN PINFCONTEXT ContextIn, OUT PINFCONTEXT ContextOut)
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
struct _THEME_FILE THEME_FILE
#define INVALID_FILE_ATTRIBUTES
_In_ WDFCOLLECTION _In_ ULONG Index
_In_ PWDFDEVICE_INIT _In_ PFN_WDF_DEVICE_SHUTDOWN_NOTIFICATION Notification
_Must_inspect_result_ _In_ WDFDEVICE _In_ PWDF_DEVICE_PROPERTY_DATA _In_ DEVPROPTYPE _In_ ULONG Size
HRESULT InstallOptionalComponents(_In_ PITEMSDATA pItemsData)
BOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode)
LONG WINAPI ChangeDisplaySettingsW(LPDEVMODEW lpDevMode, DWORD dwflags)
UINT WINAPI GetDlgItemTextW(HWND hDlg, int nIDDlgItem, LPWSTR lpString, int nMaxCount)
VOID WINAPI SwitchToThisWindow(HWND hwnd, BOOL fAltTab)
DWORD WINAPI GetLastError(void)
#define FORMAT_MESSAGE_FROM_SYSTEM
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
#define MAX_COMPUTERNAME_LENGTH
#define ListBox_AddString(hwndCtl, lpsz)
NTSYSAPI ULONG WINAPI RtlNtStatusToDosError(NTSTATUS)
#define DM_DISPLAYFREQUENCY
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
HFONT WINAPI CreateFontIndirectW(_In_ const LOGFONTW *)
#define HKEY_LOCAL_MACHINE
#define HKEY_CURRENT_USER
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HKL WINAPI GetKeyboardLayout(_In_ DWORD)
BOOL WINAPI TranslateMessage(_In_ const MSG *)
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
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)
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define LR_CREATEDIBSECTION
BOOL WINAPI SetForegroundWindow(_In_ HWND)
HANDLE WINAPI LoadImageW(_In_opt_ HINSTANCE hInst, _In_ LPCWSTR name, _In_ UINT type, _In_ int cx, _In_ int cy, _In_ UINT fuLoad)
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define QS_ALLPOSTMESSAGE
#define CDS_UPDATEREGISTRY
DWORD WINAPI MsgWaitForMultipleObjects(_In_ DWORD nCount, _In_reads_opt_(nCount) CONST HANDLE *pHandles, _In_ BOOL fWaitAll, _In_ DWORD dwMilliseconds, _In_ DWORD dwWakeMask)
int WINAPI MessageBoxW(_In_opt_ HWND hWnd, _In_opt_ LPCWSTR lpText, _In_opt_ LPCWSTR lpCaption, _In_ UINT uType)
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
LRESULT WINAPI SendDlgItemMessageW(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
HWND WINAPI GetDesktopWindow(void)
BOOL WINAPI SetWindowTextW(_In_ HWND, _In_opt_ LPCWSTR)
#define ENUM_CURRENT_SETTINGS
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI PeekMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT, _In_ UINT)
struct tagNMHDR * LPNMHDR
BOOL WINAPI EnableWindow(_In_ HWND, _In_ BOOL)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI SystemParametersInfoW(_In_ UINT uiAction, _In_ UINT uiParam, _Inout_opt_ PVOID pvParam, _In_ UINT fWinIni)
HWND WINAPI GetParent(_In_ HWND)
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define MAKEINTRESOURCEW(i)
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define SendDlgItemMessage
BOOL WINAPI DestroyWindow(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI EndDialog(_In_ HWND, _In_ INT_PTR)
BOOL WINAPI DestroyIcon(_In_ HICON)
_Inout_opt_ PVOID Parameter