44 if (!pRunSetupCommand || !pLaunchINFSection || !pLaunchINFSectionEx)
60 DWORD dwNumberOfBytesWritten;
64 static const char data[] =
66 "Signature=\"$Chicago$\"\n"
69 "CheckAdminRights=1\n";
99 hr = pRunSetupCommand(
NULL,
"idontexist.exe",
"Install", systemdir,
"Title", &hexe, 0,
NULL);
101 "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %d\n",
hr);
102 ok(hexe ==
NULL,
"Expected hexe to be NULL\n");
109 hexe = (
HANDLE)0xdeadbeef;
111 hr = pRunSetupCommand(
NULL,
"winver.exe",
"Install",
"non\\existent\\directory",
"Title", &hexe, 0,
NULL);
113 "Expected HRESULT_FROM_WIN32(ERROR_DIRECTORY), got %d\n",
hr);
114 ok(hexe ==
NULL,
"Expected hexe to be NULL\n");
121 hexe = (
HANDLE)0xdeadbeef;
126 ok(hexe == (
HANDLE)(
ULONG_PTR)0xdeadbeefdeadbeefull,
"Expected hexe to be 0xdeadbeef\n");
128 ok(hexe == (
HANDLE)0xdeadbeef,
"Expected hexe to be 0xdeadbeef\n");
136 hexe = (
HANDLE)0xdeadbeef;
138 hr = pRunSetupCommand(
NULL,
"winver.exe",
"Install", systemdir,
"Title", &hexe, 0,
NULL);
140 ok(hexe !=
NULL,
"Expected hexe to be non-NULL\n");
157 "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n",
hr);
170 "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n",
hr);
183 "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n",
hr);
201 "Expected HRESULT_FROM_WIN32(ERROR_INVALID_PARAMETER), got %d\n",
hr);
212 static char file[] =
"test.inf,DefaultInstall,4,0";
213 static char file2[] =
"test.inf,,1,0";
222 ok(
hr == 1,
"Expected 1, got %d\n",
hr);
233 ok(
hr == 0,
"Expected 0, got %d\n",
hr);
242 ok(
hr == 0,
"Expected 0, got %d\n",
hr);
245 ok(
hr == 0,
"Expected 0, got %d\n",
hr);
262 ok(
hr == 0,
"Expected 0, got %d\n",
hr);
267 lstrcatA(
cmdline,
"\\test.inf\",\"DefaultInstall\",\"c:,imacab.cab\",\"4\"");
269 ok(
hr == 0,
"Expected 0, got %d\n",
hr);
295 skip(
"Most tests need admin rights\n");
BOOL WINAPI IsNTAdmin(DWORD reserved, LPDWORD pReserved)
#define ERROR_INVALID_PARAMETER
#define GetProcAddress(x, y)
#define CreateFileA(a, b, c, d, e, f, g)
#define FILE_ATTRIBUTE_NORMAL
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
BOOL WINAPI RemoveDirectoryA(IN LPCSTR lpPathName)
BOOL WINAPI CreateDirectoryA(IN LPCSTR lpPathName, IN LPSECURITY_ATTRIBUTES lpSecurityAttributes)
BOOL WINAPI WriteFile(IN HANDLE hFile, IN LPCVOID lpBuffer, IN DWORD nNumberOfBytesToWrite OPTIONAL, OUT LPDWORD lpNumberOfBytesWritten, IN LPOVERLAPPED lpOverlapped OPTIONAL)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
DWORD WINAPI GetCurrentDirectoryA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
BOOL WINAPI SetCurrentDirectoryA(IN LPCSTR lpPathName)
DWORD WINAPI GetTempPathA(IN DWORD nBufferLength, OUT LPSTR lpBuffer)
UINT WINAPI GetSystemDirectoryA(OUT LPSTR lpBuffer, IN UINT uSize)
BOOL WINAPI TerminateProcess(IN HANDLE hProcess, IN UINT uExitCode)
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
LPSTR WINAPI lstrcpyA(LPSTR lpString1, LPCSTR lpString2)
LPSTR WINAPI lstrcatA(LPSTR lpString1, LPCSTR lpString2)
int WINAPI lstrlenA(LPCSTR lpString)
#define ERROR_FILE_NOT_FOUND
static void create_inf_file(void)
static BOOL init_function_pointers(void)
static BOOL is_spapi_err(DWORD err)
static char CURR_DIR[MAX_PATH]
static void test_LaunchINFSectionEx(void)
static void test_RunSetupCommand(void)
static void test_LaunchINFSection(void)
#define HRESULT_FROM_WIN32(x)