80 "Signature=\"$Chicago$\"\n"
82 "AddReg=Add.Settings\n"
84 "HKCU,Software\\Wine\\setupapitest,,\n";
104 "Expected registry key Software\\Wine\\setupapitest to %s, RegDeleteKey returned %d\n",
105 expectsuccess ?
"exist" :
"not exist",
112 static const char infwithspaces[] =
"test file.inf";
139 "Signature=\"$Chicago$\"\n"
141 "DelReg=Del.Settings\n"
143 "HKCU,Software\\Wine\\setupapitest\n";
154 "Expected RegCreateKeyA to succeed\n");
158 "Expected registry key to exist\n");
187 "Expected RegCreateKeyA to succeed\n");
191 "Expected registry key to exist\n");
199 ok(
ret,
"Unexpected failure\n");
225 strcpy(inf,
"[Version]\nSignature=\"$Chicago$\"\n");
233 ok(!
ret,
"Expected failure\n");
235 "Expected ERROR_SECTION_NOT_FOUND, got %08x\n",
GetLastError());
240 strcat(inf,
"[Winetest.Services]\n");
245 ok(!
ret,
"Expected failure\n");
247 "Expected ERROR_SECTION_NOT_FOUND, got %08x\n",
GetLastError());
252 strcat(inf,
"AddService=Winetest,,Winetest.Service\n");
257 ok(!
ret,
"Expected failure\n");
259 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n",
GetLastError());
264 strcat(inf,
"[Winetest.Service]\n");
269 ok(!
ret,
"Expected failure\n");
271 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n",
GetLastError());
276 strcat(inf,
"ServiceBinary=%12%\\winetest.sys\n");
281 ok(!
ret,
"Expected failure\n");
283 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n",
GetLastError());
288 strcat(inf,
"ServiceType=1\n");
293 ok(!
ret,
"Expected failure\n");
295 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n",
GetLastError());
300 strcat(inf,
"StartType=4\n");
305 ok(!
ret,
"Expected failure\n");
307 "Expected ERROR_BAD_SERVICE_INSTALLSECT, got %08x\n",
GetLastError());
312 strcat(inf,
"ErrorControl=1");
319 skip(
"Not enough rights to install the service\n");
324 ok(
ret,
"Expected success\n");
334 ok(svc_handle !=
NULL,
"Service was not created\n");
343 strcpy(inf,
"[Version]\nSignature=\"$Chicago$\"\n");
344 strcat(inf,
"[XSP.InstallPerVer]\n");
345 strcat(inf,
"AddReg=AspEventlogMsg.Reg,Perf.Reg,AspVersions.Reg,FreeADO.Reg,IndexServer.Reg\n");
352 ok(
ret,
"Expected success\n");
368 static const char *inf =
370 "Signature=\"$Chicago$\"\n"
371 "[DestinationDirs]\n"
372 "Winetest.DriverFiles=12\n"
374 "CopyFiles=Winetest.DriverFiles\n"
375 "[DefaultInstall.Services]\n"
376 "AddService=Winetest,,Winetest.Service\n"
377 "[Winetest.Service]\n"
378 "ServiceBinary=%12%\\winetest.sys\n"
382 "[Winetest.DriverFiles]\n"
390 skip(
"Not enough rights to install the service\n");
417 ok(svc_handle !=
NULL,
"Service was not created\n");
436 static const char *inf =
438 "Signature=\"$Chicago$\"\n"
440 "ProfileItems=TestItem,TestItem2,TestGroup\n"
443 "CmdLine=11,,notepad.exe\n"
446 "CmdLine=11,,notepad.exe\n"
454 skip(
"No common program files directory exists\n");
461 skip(
"need admin rights\n");
495 static const char inffile2[] =
"test2.inf";
496 static const char *inf =
498 "Signature=\"$Chicago$\"";
533 ok(
ret,
"expected SetupGetInfFileListA to succeed!\n");
538 "unexpected filename %s\n",
p);
548 static const char inffile2[] =
"test2.inf";
549 static const WCHAR inffile2W[] = {
't',
'e',
's',
't',
'2',
'.',
'i',
'n',
'f',0};
550 static const char invalid_inf[] =
"invalid.inf";
551 static const WCHAR invalid_infW[] = {
'i',
'n',
'v',
'a',
'l',
'i',
'd',
'.',
'i',
'n',
'f',0};
552 static const char *inf =
554 "Signature=\"$Chicago$\"";
555 static const char *inf2 =
557 "Signature=\"$CHICAGO$\"";
558 static const char *infNT =
560 "Signature=\"$WINDOWS NT$\"";
575 ok(
ret,
"expected SetupGetInfFileListW to succeed! Error: %d\n",
GetLastError());
576 ok(
expected > 0,
"expected required buffersize to be at least 1\n");
582 ok(!
ret,
"expected SetupGetInfFileListW to fail!\n");
612 ok(
ret,
"expected SetupGetInfFileListW to succeed!\n");
613 ok(
outsize == 1,
"expected required buffersize to be 1, got %d\n",
outsize);
615 "expected error ERROR_PATH_NOT_FOUND, got %d\n",
GetLastError());
619 create_inf_file(invalid_inf,
"This content does not match the inf file format");
628 ok(!
ret,
"expected SetupGetInfFileListW to fail!\n");
630 "expected error ERROR_DIRECTORY, got %d\n",
GetLastError());
638 ok(!
ret,
"expected SetupGetInfFileListW to fail!\n");
640 "expected error ERROR_DIRECTORY, got %d\n",
GetLastError());
647 ok(
ret,
"expected SetupGetInfFileListW to succeed!\n");
658 ok(
ret,
"expected SetupGetInfFileListW to succeed!\n");
670 ok(
ret,
"expected SetupGetInfFileListW to succeed!\n");
681 ok(
ret,
"expected SetupGetInfFileListW to succeed!\n");
692 ok(
ret,
"expected SetupGetInfFileListW to succeed!\n");
707 "Signature=\"$Chicago$\"\n"
709 "AddReg=Add.Settings\n"
711 "HKCU,Software\\Wine\\setupapitest,dirid,,%%%i%%\n";
728 size =
sizeof(actual);
static SC_HANDLE scm_handle
char * strcat(char *DstString, const char *SrcString)
int strcmp(const char *String1, const char *String2)
ACPI_SIZE strlen(const char *String)
char * strcpy(char *DstString, const char *SrcString)
#define RegCloseKey(hKey)
LONG WINAPI RegCreateKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegOpenKeyA(HKEY hKey, LPCSTR lpSubKey, PHKEY phkResult)
LONG WINAPI RegQueryValueExA(_In_ HKEY hkeyorg, _In_ LPCSTR name, _In_ LPDWORD reserved, _Out_opt_ LPDWORD type, _Out_opt_ LPBYTE data, _Inout_opt_ LPDWORD count)
LONG WINAPI RegDeleteKeyA(_In_ HKEY hKey, _In_ LPCSTR lpSubKey)
#define INVALID_HANDLE_VALUE
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
#define MultiByteToWideChar
#define ERROR_ACCESS_DENIED
static void cleanup(void)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
DWORD WINAPI GetFileAttributesA(LPCSTR lpFileName)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI GetWindowsDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
int WINAPI lstrcmpA(LPCSTR str1, LPCSTR str2)
BOOL WINAPI SetupInstallFromInfSectionA(HWND owner, HINF hinf, PCSTR section, UINT flags, HKEY key_root, PCSTR src_root, UINT copy_flags, PSP_FILE_CALLBACK_A callback, PVOID context, HDEVINFO devinfo, PSP_DEVINFO_DATA devinfo_data)
void WINAPI InstallHinfSectionW(HWND hwnd, HINSTANCE handle, LPCWSTR cmdline, INT show)
BOOL WINAPI SetupInstallServicesFromInfSectionA(HINF Inf, PCSTR SectionName, DWORD Flags)
HINF WINAPI SetupOpenInfFileA(PCSTR name, PCSTR class, DWORD style, UINT *error)
BOOL WINAPI SetupGetInfFileListW(IN PCWSTR DirectoryPath OPTIONAL, IN DWORD InfStyle, IN OUT PWSTR ReturnBuffer OPTIONAL, IN DWORD ReturnBufferSize OPTIONAL, OUT PDWORD RequiredSize OPTIONAL)
BOOL WINAPI SetupGetInfFileListA(IN PCSTR DirectoryPath OPTIONAL, IN DWORD InfStyle, IN OUT PSTR ReturnBuffer OPTIONAL, IN DWORD ReturnBufferSize OPTIONAL, OUT PDWORD RequiredSize OPTIONAL)
HRESULT WINAPI SHGetFolderPathA(HWND hwndOwner, int nFolder, HANDLE hToken, DWORD dwFlags, LPSTR pszPath)
UINT WINAPI GetTempFileNameA(IN LPCSTR lpPathName, IN LPCSTR lpPrefixString, IN UINT uUnique, OUT LPSTR lpTempFileName)
GLuint GLuint GLsizei GLenum type
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
unsigned char size_t * outsize
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define ERROR_FILE_NOT_FOUND
#define sprintf(buf, format,...)
static void create_inf_file(void)
static char CURR_DIR[MAX_PATH]
static void ok_registry(BOOL expectsuccess)
static void check_dirid(int dirid, LPCSTR expected)
static const char * cmdline_inf_reg
static void test_registry(void)
static void test_install_svc_from(void)
static const WCHAR inffileW[]
static const char * cmdline_inf
static void test_inffilelistA(void)
static void test_cmdline(void)
static void test_install_from(void)
static LRESULT CALLBACK cbt_hook_proc(int nCode, WPARAM wParam, LPARAM lParam)
static void test_profile_items(void)
static void test_dirid(void)
static const char dirid_inf[]
static void test_inffilelist(void)
static void run_cmdline(LPCSTR section, int mode, LPCSTR path)
static void test_driver_install(void)
static const char inffile[]
struct @1673::@1674 driver
BOOL WINAPI DeleteService(SC_HANDLE hService)
SC_HANDLE WINAPI OpenServiceA(SC_HANDLE hSCManager, LPCSTR lpServiceName, DWORD dwDesiredAccess)
SC_HANDLE WINAPI OpenSCManagerA(LPCSTR lpMachineName, LPCSTR lpDatabaseName, DWORD dwDesiredAccess)
BOOL WINAPI CloseServiceHandle(SC_HANDLE hSCObject)
#define ERROR_BAD_SERVICE_INSTALLSECT
#define ERROR_SECTION_NOT_FOUND
#define CSIDL_COMMON_PROGRAMS
VOID WINAPI SetupCloseInfFile(IN HINF InfHandle)
#define INVALID_FILE_ATTRIBUTES
DWORD WINAPI GetLastError(void)
DWORD WINAPI GetCurrentThreadId(void)
#define ERROR_PATH_NOT_FOUND
#define HKEY_CURRENT_USER
HHOOK WINAPI SetWindowsHookExA(_In_ int, _In_ HOOKPROC, _In_opt_ HINSTANCE, _In_ DWORD)
BOOL WINAPI UnhookWindowsHookEx(_In_ HHOOK)
LRESULT WINAPI CallNextHookEx(_In_opt_ HHOOK, _In_ int, _In_ WPARAM, _In_ LPARAM)