38#define SPAPI_ERROR 0xE0000000L
39#define SPAPI_PREFIX 0x800F0000L
40#define SPAPI_MASK 0xFFFFL
41#define HRESULT_FROM_SPAPI(x) ((HRESULT)((x & SPAPI_MASK) | SPAPI_PREFIX))
43#define ADV_HRESULT(x) ((x & SPAPI_ERROR) ? HRESULT_FROM_SPAPI(x) : HRESULT_FROM_WIN32(x))
64 'C',
'h',
'e',
'c',
'k',
'A',
'd',
'm',
'i',
'n',
'R',
'i',
'g',
'h',
't',
's',0
67static const WCHAR PerUserInstall[] = {
'P',
'e',
'r',
'U',
's',
'e',
'r',
'I',
'n',
's',
't',
'a',
'l',
'l',0};
68static const WCHAR RegisterOCXs[] = {
'R',
'e',
'g',
'i',
's',
't',
'e',
'r',
'O',
'C',
'X',
's',0};
70 'R',
'u',
'n',
'P',
'r',
'e',
'S',
'e',
't',
'u',
'p',
'C',
'o',
'm',
'm',
'a',
'n',
'd',
's',0
73 'R',
'u',
'n',
'P',
'o',
's',
't',
'S',
'e',
't',
'u',
'p',
'C',
'o',
'm',
'm',
'a',
'n',
'd',
's',0
106 static const WCHAR disp_name[] = {
'D',
'i',
's',
'p',
'l',
'a',
'y',
'N',
'a',
'm',
'e',0};
107 static const WCHAR version[] = {
'V',
'e',
'r',
's',
'i',
'o',
'n',0};
108 static const WCHAR is_installed[] = {
'I',
's',
'I',
'n',
's',
't',
'a',
'l',
'l',
'e',
'd',0};
109 static const WCHAR comp_id[] = {
'C',
'o',
'm',
'p',
'o',
'n',
'e',
'n',
't',
'I',
'D',0};
110 static const WCHAR guid[] = {
'G',
'U',
'I',
'D',0};
111 static const WCHAR locale[] = {
'L',
'o',
'c',
'a',
'l',
'e',0};
112 static const WCHAR stub_path[] = {
'S',
't',
'u',
'b',
'P',
'a',
't',
'h',0};
207 if (quoted && *
token ==
'"')
230 const int MIN_PATH_LEN = 3;
235 if ((
path[1] ==
':' &&
path[2] ==
'\\') || (
path[0] ==
'\\' &&
path[1] ==
'\\'))
266 WCHAR static_buffer[200];
396 static const WCHAR backslash[] = {
'\\',0};
397 static const WCHAR inf_dir[] = {
'\\',
'I',
'N',
'F',0};
401 len =
ptr - inf_filename + 1;
404 else if (working_dir && *working_dir)
432 if (!
info->working_dir)
448 static const WCHAR backslash[] = {
'\\',0};
449 static const WCHAR default_install[] = {
450 'D',
'e',
'f',
'a',
'u',
'l',
't',
'I',
'n',
's',
't',
'a',
'l',
'l',0
459 if (!
info->inf_filename)
465 if (!install_sec || !*install_sec)
467 len =
sizeof(default_install) - 1;
468 ptr = default_install;
477 if (!
info->install_sec)
624 TRACE(
"(%p, %p, %p)\n",
hwnd, pCab, pReserved);
676 TRACE(
"(%p, %p, %p)\n",
hwnd, pCab, pReserved);
681 FIXME(
"Cab archive not extracted!\n");
750 LPWSTR cmdline_copy, cmdline_ptr;
751 LPWSTR inf_filename, install_sec;
762 cmdline_ptr = cmdline_copy;
848 LPWSTR cmdline_copy, cmdline_ptr;
859 cmdline_ptr = cmdline_copy;
899 if (phEXE) *phEXE =
NULL;
916 *phEXE =
pi.hProcess;
941 TRACE(
"(%p, %s, %s, %s, %s, %p, %d, %p)\n",
946 if (!szCmdName || !szDir)
998 TRACE(
"(%p, %s, %s, %s, %s, %p, %d, %p)\n",
1004 FIXME(
"Unhandled flag: RSC_FLAG_UPDHLPDLLS\n");
1006 if (!szCmdName || !szDir)
#define RSC_FLAG_UPDHLPDLLS
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
#define ERROR_INSUFFICIENT_BUFFER
HRESULT do_ocx_reg(HMODULE hocx, BOOL do_reg, const WCHAR *flags, const WCHAR *param)
void set_ldids(HINF hInf, LPCWSTR pszInstallSection, LPCWSTR pszWorkingDir)
HRESULT WINAPI SetPerUserSecValuesW(PERUSERSECTIONW *pPerUser)
BOOL WINAPI IsNTAdmin(DWORD reserved, LPDWORD pReserved)
HRESULT WINAPI DelNodeW(LPCWSTR pszFileOrDirName, DWORD dwFlags)
HRESULT WINAPI RunSetupCommandA(HWND hWnd, LPCSTR szCmdName, LPCSTR szInfSection, LPCSTR szDir, LPCSTR lpszTitle, HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved)
static const WCHAR RegisterOCXs[]
static HRESULT get_working_dir(ADVInfo *info, LPCWSTR inf_filename, LPCWSTR working_dir)
static HRESULT per_user_install_callback(HINF hinf, PCWSTR field, const void *arg)
static void install_release(const ADVInfo *info)
HRESULT(* iterate_fields_func)(HINF hinf, PCWSTR field, const void *arg)
HRESULT WINAPI ExecuteCabW(HWND hwnd, CABINFOW *pCab, LPVOID pReserved)
static const WCHAR DelDirs[]
static const WCHAR PerUserInstall[]
static BOOL is_full_path(LPCWSTR path)
HRESULT WINAPI RunSetupCommandW(HWND hWnd, LPCWSTR szCmdName, LPCWSTR szInfSection, LPCWSTR szDir, LPCWSTR lpszTitle, HANDLE *phEXE, DWORD dwFlags, LPVOID pvReserved)
static HRESULT iterate_section_fields(HINF hinf, PCWSTR section, PCWSTR key, iterate_fields_func callback, void *arg)
static HRESULT del_dirs_callback(HINF hinf, PCWSTR field, const void *arg)
INT WINAPI LaunchINFSectionW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT show)
static HRESULT spapi_install(const ADVInfo *info)
HRESULT WINAPI ExecuteCabA(HWND hwnd, CABINFOA *pCab, LPVOID pReserved)
static const WCHAR RunPostSetupCommands[]
static HRESULT run_setup_commands_callback(HINF hinf, PCWSTR field, const void *arg)
static HRESULT adv_install(ADVInfo *info)
static HRESULT install_init(LPCWSTR inf_filename, LPCWSTR install_sec, LPCWSTR working_dir, DWORD flags, ADVInfo *info)
LPWSTR get_parameter(LPWSTR *params, WCHAR separator, BOOL quoted)
static HRESULT register_ocxs_callback(HINF hinf, PCWSTR field, const void *arg)
static const WCHAR CheckAdminRights[]
static WCHAR * get_field_string(INFCONTEXT *context, DWORD index, WCHAR *buffer, const WCHAR *static_buffer, DWORD *size)
HRESULT launch_exe(LPCWSTR cmd, LPCWSTR dir, HANDLE *phEXE)
static HRESULT DoInfInstallW(const SETUPCOMMAND_PARAMSW *setup)
HRESULT WINAPI DoInfInstall(const SETUPCOMMAND_PARAMS *setup)
HRESULT WINAPI LaunchINFSectionExA(HWND hWnd, HINSTANCE hInst, LPSTR cmdline, INT show)
HRESULT WINAPI LaunchINFSectionExW(HWND hWnd, HINSTANCE hInst, LPWSTR cmdline, INT show)
static const WCHAR RunPreSetupCommands[]
INT WINAPI LaunchINFSectionA(HWND hWnd, HINSTANCE hInst, LPSTR cmdline, INT show)
static HRESULT check_admin_rights(const ADVInfo *info)
#define GetCurrentDirectoryW(x, y)
#define INVALID_HANDLE_VALUE
#define HeapFree(x, y, z)
#define MultiByteToWideChar
static const WCHAR version[]
static const WCHAR separator[]
DWORD WINAPI GetFileAttributesW(LPCWSTR lpFileName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryExW(LPCWSTR lpLibFileName, HANDLE hFile, DWORD dwFlags)
UINT WINAPI GetWindowsDirectoryW(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)
HRESULT WINAPI DECLSPEC_HOTPATCH OleInitialize(LPVOID reserved)
void WINAPI DECLSPEC_HOTPATCH OleUninitialize(void)
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)
HINF WINAPI SetupOpenInfFileW(PCWSTR name, PCWSTR class, DWORD style, UINT *error)
BOOL WINAPI SetupFindNextMatchLineW(PINFCONTEXT context_in, PCWSTR key, PINFCONTEXT context_out)
BOOL WINAPI SetupGetLineTextW(PINFCONTEXT context, HINF hinf, PCWSTR section_name, PCWSTR key_name, PWSTR buffer, DWORD size, PDWORD required)
PVOID WINAPI SetupInitDefaultQueueCallbackEx(HWND owner, HWND progress, UINT msg, DWORD reserved1, PVOID reserved2)
UINT WINAPI SetupDefaultQueueCallbackW(PVOID context, UINT notification, UINT_PTR param1, UINT_PTR param2)
void WINAPI SetupTermDefaultQueueCallback(PVOID context)
#define check(expected, result)
GLuint GLuint GLsizei count
GLenum const GLfloat * params
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
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 token
_Check_return_ long __cdecl wcstol(_In_z_ const wchar_t *_Str, _Out_opt_ _Deref_post_z_ wchar_t **_EndPtr, _In_ int _Radix)
#define MAX_INF_STRING_LENGTH
LPWSTR WINAPI lstrcatW(LPWSTR lpString1, LPCWSTR lpString2)
static IPrintDialogCallback callback
static LPCSTR DWORD void * pvReserved
NTSYSAPI BOOLEAN NTAPI RtlCreateUnicodeStringFromAsciiz(_Out_ PUNICODE_STRING Destination, _In_ PCSZ Source)
NTSYSAPI VOID NTAPI RtlFreeUnicodeString(PUNICODE_STRING UnicodeString)
WCHAR szSrcPath[MAX_PATH]
WCHAR szStub[MAX_PATH *4]
DWORD WINAPI WaitForSingleObject(IN HANDLE hHandle, IN DWORD dwMilliseconds)
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 SetupGetIntField(IN PINFCONTEXT Context, IN ULONG FieldIndex, OUT INT *IntegerValue)
ULONG WINAPI SetupGetFieldCount(IN PINFCONTEXT Context)
BOOL WINAPI SetupFindNextLine(IN PINFCONTEXT ContextIn, OUT PINFCONTEXT ContextOut)
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)
#define LOAD_WITH_ALTERED_SEARCH_PATH
#define CREATE_DEFAULT_ERROR_MODE
#define CREATE_NEW_PROCESS_GROUP
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define HRESULT_FROM_WIN32(x)
#define HKEY_LOCAL_MACHINE