2 * Unit tests for advpack.dll
4 * Copyright (C) 2005 Robert Reif
5 * Copyright (C) 2005 Sami Aario
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
26 #include "wine/test.h"
28 /* defines for the TranslateInfString/Ex tests */
29 #define TEST_STRING1 "\\Application Name"
30 #define TEST_STRING2 "%49001%\\Application Name"
32 /* defines for the SetPerUserSecValues tests */
33 #define GUID_KEY "SOFTWARE\\Microsoft\\Active Setup\\Installed Components\\guid"
34 #define REG_VAL_EXISTS(key, value) !RegQueryValueEx(key, value, NULL, NULL, NULL, NULL)
35 #define OPEN_GUID_KEY() !RegOpenKey(HKEY_LOCAL_MACHINE, GUID_KEY, &guid)
37 static HRESULT (WINAPI *pCloseINFEngine)(HINF);
38 static HRESULT (WINAPI *pDelNode)(LPCSTR,DWORD);
39 static HRESULT (WINAPI *pGetVersionFromFile)(LPCSTR,LPDWORD,LPDWORD,BOOL);
40 static HRESULT (WINAPI *pOpenINFEngine)(PCSTR,PCSTR,DWORD,HINF*,PVOID);
41 static HRESULT (WINAPI *pSetPerUserSecValues)(PPERUSERSECTION pPerUser);
42 static HRESULT (WINAPI *pTranslateInfString)(LPCSTR,LPCSTR,LPCSTR,LPCSTR,LPSTR,DWORD,LPDWORD,LPVOID);
43 static HRESULT (WINAPI *pTranslateInfStringEx)(HINF,PCSTR,PCSTR,PCSTR,PSTR,DWORD,PDWORD,PVOID);
45 static CHAR PROG_FILES[MAX_PATH];
46 static DWORD PROG_FILES_LEN;
48 static void get_progfiles_dir(void)
51 DWORD size = MAX_PATH;
53 RegOpenKeyA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Windows\\CurrentVersion", &hkey);
54 RegQueryValueExA(hkey, "ProgramFilesDir", NULL, NULL, (LPBYTE)PROG_FILES, &size);
57 lstrcatA(PROG_FILES, TEST_STRING1);
58 PROG_FILES_LEN = lstrlenA(PROG_FILES) + 1;
61 static BOOL init_function_pointers(void)
63 HMODULE hAdvPack = LoadLibraryA("advpack.dll");
68 pCloseINFEngine = (void*)GetProcAddress(hAdvPack, "CloseINFEngine");
69 pDelNode = (void *)GetProcAddress(hAdvPack, "DelNode");
70 pGetVersionFromFile = (void *)GetProcAddress(hAdvPack, "GetVersionFromFile");
71 pOpenINFEngine = (void*)GetProcAddress(hAdvPack, "OpenINFEngine");
72 pSetPerUserSecValues = (void*)GetProcAddress(hAdvPack, "SetPerUserSecValues");
73 pTranslateInfString = (void *)GetProcAddress(hAdvPack, "TranslateInfString");
74 pTranslateInfStringEx = (void*)GetProcAddress(hAdvPack, "TranslateInfStringEx");
76 if (!pCloseINFEngine || !pDelNode || !pGetVersionFromFile ||
77 !pOpenINFEngine || !pSetPerUserSecValues || !pTranslateInfString)
83 static void version_test(void)
89 hr = pGetVersionFromFile("kernel32.dll", &major, &minor, FALSE);
90 ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
92 trace("kernel32.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n",
96 hr = pGetVersionFromFile("kernel32.dll", &major, &minor, TRUE);
97 ok (hr == S_OK, "GetVersionFromFileEx(kernel32.dll) failed, returned "
99 trace("kernel32.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major),
100 HIWORD(minor), LOWORD(minor));
103 hr = pGetVersionFromFile("advpack.dll", &major, &minor, FALSE);
104 ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned "
106 trace("advpack.dll Language ID: 0x%08x, Codepage ID: 0x%08x\n",
110 hr = pGetVersionFromFile("advpack.dll", &major, &minor, TRUE);
111 ok (hr == S_OK, "GetVersionFromFileEx(advpack.dll) failed, returned "
113 trace("advpack.dll version: %d.%d.%d.%d\n", HIWORD(major), LOWORD(major),
114 HIWORD(minor), LOWORD(minor));
117 static void delnode_test(void)
121 CHAR currDir[MAX_PATH];
124 /* Native DelNode apparently does not support relative paths, so we use
125 absolute paths for testing */
126 currDirLen = GetCurrentDirectoryA(sizeof(currDir) / sizeof(CHAR), currDir);
127 assert(currDirLen > 0 && currDirLen < sizeof(currDir) / sizeof(CHAR));
129 if(currDir[currDirLen - 1] == '\\')
130 currDir[--currDirLen] = 0;
132 /* Simple tests; these should fail. */
133 hr = pDelNode(NULL, 0);
134 ok (hr == E_FAIL, "DelNode called with NULL pathname should return E_FAIL\n");
135 hr = pDelNode("", 0);
136 ok (hr == E_FAIL, "DelNode called with empty pathname should return E_FAIL\n");
138 /* Test deletion of a file. */
139 hn = CreateFile("DelNodeTestFile1", GENERIC_WRITE, 0, NULL,
140 CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
141 assert(hn != INVALID_HANDLE_VALUE);
143 hr = pDelNode(lstrcat(currDir, "\\DelNodeTestFile1"), 0);
144 ok (hr == S_OK, "DelNode failed deleting a single file\n");
145 currDir[currDirLen] = '\0';
147 /* Test deletion of an empty directory. */
148 CreateDirectoryA("DelNodeTestDir", NULL);
149 hr = pDelNode(lstrcat(currDir, "\\DelNodeTestDir"), 0);
150 ok (hr == S_OK, "DelNode failed deleting an empty directory\n");
151 currDir[currDirLen] = '\0';
153 /* Test deletion of a directory containing one file. */
154 CreateDirectoryA("DelNodeTestDir", NULL);
155 hn = CreateFile("DelNodeTestDir\\DelNodeTestFile1", GENERIC_WRITE, 0, NULL,
156 CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
157 assert(hn != INVALID_HANDLE_VALUE);
159 hr = pDelNode(lstrcat(currDir, "\\DelNodeTestDir"), 0);
160 ok (hr == S_OK, "DelNode failed deleting a directory containing one file\n");
161 currDir[currDirLen] = '\0';
163 /* Test deletion of a directory containing multiple files. */
164 CreateDirectoryA("DelNodeTestDir", NULL);
165 hn = CreateFile("DelNodeTestDir\\DelNodeTestFile1", GENERIC_WRITE, 0, NULL,
166 CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
167 assert(hn != INVALID_HANDLE_VALUE);
169 hn = CreateFile("DelNodeTestDir\\DelNodeTestFile2", GENERIC_WRITE, 0, NULL,
170 CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
171 assert(hn != INVALID_HANDLE_VALUE);
173 hn = CreateFile("DelNodeTestDir\\DelNodeTestFile3", GENERIC_WRITE, 0, NULL,
174 CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
175 assert(hn != INVALID_HANDLE_VALUE);
177 hr = pDelNode(lstrcat(currDir, "\\DelNodeTestDir"), 0);
178 ok (hr == S_OK, "DelNode failed deleting a directory containing multiple files\n");
179 currDir[currDirLen] = '\0';
182 static void append_str(char **str, const char *data)
185 *str += strlen(*str);
188 static void create_inf_file()
192 DWORD dwNumberOfBytesWritten;
193 HANDLE hf = CreateFile("c:\\test.inf", GENERIC_WRITE, 0, NULL,
194 CREATE_ALWAYS, FILE_ATTRIBUTE_NORMAL, NULL);
196 append_str(&ptr, "[Version]\n");
197 append_str(&ptr, "Signature=\"$Chicago$\"\n");
198 append_str(&ptr, "[CustInstDestSection]\n");
199 append_str(&ptr, "49001=ProgramFilesDir\n");
200 append_str(&ptr, "[ProgramFilesDir]\n");
201 append_str(&ptr, "HKLM,\"Software\\Microsoft\\Windows\\CurrentVersion\",");
202 append_str(&ptr, "\"ProgramFilesDir\",,\"%%24%%\\%%LProgramF%%\"\n");
203 append_str(&ptr, "[section]\n");
204 append_str(&ptr, "NotACustomDestination=Version\n");
205 append_str(&ptr, "CustomDestination=CustInstDestSection\n");
206 append_str(&ptr, "[Options.NTx86]\n");
207 append_str(&ptr, "49001=ProgramFilesDir\n");
208 append_str(&ptr, "InstallDir=%%49001%%\\%%DefaultAppPath%%\n");
209 append_str(&ptr, "CustomHDestination=CustInstDestSection\n");
210 append_str(&ptr, "[Strings]\n");
211 append_str(&ptr, "DefaultAppPath=\"Application Name\"\n");
212 append_str(&ptr, "LProgramF=\"Program Files\"\n");
214 WriteFile(hf, data, ptr - data, &dwNumberOfBytesWritten, NULL);
218 static void translateinfstring_test()
221 char buffer[MAX_PATH];
226 /* pass in a couple invalid parameters */
227 hr = pTranslateInfString(NULL, NULL, NULL, NULL, buffer, MAX_PATH, &dwSize, NULL);
228 ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got 0x%08x\n", (UINT)hr);
230 /* try to open an inf file that doesn't exist */
231 hr = pTranslateInfString("c:\\a.inf", "Options.NTx86", "Options.NTx86",
232 "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
233 ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND) || hr == E_INVALIDARG ||
234 hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND),
235 "Expected E_INVALIDARG, 0x80070002 or 0x8007007e, got 0x%08x\n", (UINT)hr);
237 if(hr == HRESULT_FROM_WIN32(ERROR_MOD_NOT_FOUND))
239 trace("WinNT 3.51 detected. Skipping tests for TranslateInfString()\n");
243 /* try a nonexistent section */
245 hr = pTranslateInfString("c:\\test.inf", "idontexist", "Options.NTx86",
246 "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
247 ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", (UINT)hr);
248 ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
249 ok(dwSize == 25, "Expected size 25, got %d\n", dwSize);
252 /* try other nonexistent section */
253 hr = pTranslateInfString("c:\\test.inf", "Options.NTx86", "idontexist",
254 "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
255 ok(hr == SPAPI_E_LINE_NOT_FOUND || hr == E_INVALIDARG,
256 "Expected SPAPI_E_LINE_NOT_FOUND or E_INVALIDARG, got 0x%08x\n", (UINT)hr);
259 /* try nonexistent key */
260 hr = pTranslateInfString("c:\\test.inf", "Options.NTx86", "Options.NTx86",
261 "notvalid", buffer, MAX_PATH, &dwSize, NULL);
262 ok(hr == SPAPI_E_LINE_NOT_FOUND || hr == E_INVALIDARG,
263 "Expected SPAPI_E_LINE_NOT_FOUND or E_INVALIDARG, got 0x%08x\n", (UINT)hr);
266 /* test the behavior of pszInstallSection */
267 hr = pTranslateInfString("c:\\test.inf", "section", "Options.NTx86",
268 "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
269 ok(hr == ERROR_SUCCESS || hr == E_FAIL,
270 "Expected ERROR_SUCCESS or E_FAIL, got 0x%08x\n", (UINT)hr);
272 if(hr == ERROR_SUCCESS)
274 ok(!strcmp(buffer, PROG_FILES), "Expected '%s', got '%s'\n", PROG_FILES, buffer);
275 ok(dwSize == PROG_FILES_LEN, "Expected size %d, got %d\n", PROG_FILES_LEN, dwSize);
279 /* try without a pszInstallSection */
280 hr = pTranslateInfString("c:\\test.inf", NULL, "Options.NTx86",
281 "InstallDir", buffer, MAX_PATH, &dwSize, NULL);
282 ok(hr == S_OK, "Expected S_OK, got 0x%08x\n", (UINT)hr);
285 ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
286 ok(dwSize == 25, "Expected size 25, got %d\n", dwSize);
289 DeleteFile("c:\\a.inf");
290 DeleteFile("c:\\test.inf");
293 static void translateinfstringex_test(void)
297 char buffer[MAX_PATH];
298 DWORD size = MAX_PATH;
302 /* need to see if there are any flags */
304 /* try a NULL filename */
305 hr = pOpenINFEngine(NULL, "Options.NTx86", 0, &hinf, NULL);
306 ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
308 /* try an empty filename */
309 hr = pOpenINFEngine("", "Options.NTx86", 0, &hinf, NULL);
310 ok(hr == HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND),
311 "Expected HRESULT_FROM_WIN32(ERROR_FILE_NOT_FOUND), got %08x\n", hr);
313 /* try a NULL hinf */
314 hr = pOpenINFEngine("c:\\test.inf", "Options.NTx86", 0, NULL, NULL);
315 ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
317 /* open the INF without the Install section specified */
318 hr = pOpenINFEngine("c:\\test.inf", NULL, 0, &hinf, NULL);
319 ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
321 /* try a NULL hinf */
322 hr = pTranslateInfStringEx(NULL, "c:\\test.inf", "Options.NTx86", "InstallDir",
323 buffer, size, &size, NULL);
324 ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
326 /* try a NULL filename */
327 hr = pTranslateInfStringEx(hinf, NULL, "Options.NTx86", "InstallDir",
328 buffer, size, &size, NULL);
329 ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
331 /* try an empty filename */
333 hr = pTranslateInfStringEx(hinf, "", "Options.NTx86", "InstallDir",
334 buffer, size, &size, NULL);
335 ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
338 ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
339 ok(size == 25, "Expected size 25, got %d\n", size);
342 /* try a NULL translate section */
343 hr = pTranslateInfStringEx(hinf, "c:\\test.inf", NULL, "InstallDir",
344 buffer, size, &size, NULL);
345 ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
347 /* try an empty translate section */
348 hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "", "InstallDir",
349 buffer, size, &size, NULL);
350 ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08x\n", hr);
352 /* try a NULL translate key */
353 hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "Options.NTx86", NULL,
354 buffer, size, &size, NULL);
355 ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
357 /* try an empty translate key */
358 hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "Options.NTx86", "",
359 buffer, size, &size, NULL);
360 ok(hr == SPAPI_E_LINE_NOT_FOUND, "Expected SPAPI_E_LINE_NOT_FOUND, got %08x\n", hr);
362 /* successfully translate the string */
364 hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "Options.NTx86", "InstallDir",
365 buffer, size, &size, NULL);
366 ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
369 ok(!strcmp(buffer, TEST_STRING2), "Expected %s, got %s\n", TEST_STRING2, buffer);
370 ok(size == 25, "Expected size 25, got %d\n", size);
373 /* try a NULL hinf */
374 hr = pCloseINFEngine(NULL);
375 ok(hr == E_INVALIDARG, "Expected E_INVALIDARG, got %08x\n", hr);
377 /* successfully close the hinf */
378 hr = pCloseINFEngine(hinf);
379 ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
381 /* open the inf with the install section */
382 hr = pOpenINFEngine("c:\\test.inf", "section", 0, &hinf, NULL);
383 ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
385 /* translate the string with the install section specified */
387 hr = pTranslateInfStringEx(hinf, "c:\\test.inf", "Options.NTx86", "InstallDir",
388 buffer, size, &size, NULL);
389 ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
390 ok(!strcmp(buffer, PROG_FILES), "Expected %s, got %s\n", PROG_FILES, buffer);
391 ok(size == PROG_FILES_LEN, "Expected size %d, got %d\n", PROG_FILES_LEN, size);
393 /* close the INF again */
394 hr = pCloseINFEngine(hinf);
395 ok(hr == S_OK, "Expected S_OK, got %08x\n", hr);
397 DeleteFileA("c:\\test.inf");
400 static BOOL check_reg_str(HKEY hkey, LPCSTR name, LPCSTR value)
402 DWORD size = MAX_PATH;
403 char check[MAX_PATH];
405 if (RegQueryValueEx(hkey, name, NULL, NULL, (LPBYTE)check, &size))
408 return !lstrcmp(check, value);
411 static BOOL check_reg_dword(HKEY hkey, LPCSTR name, DWORD value)
413 DWORD size = sizeof(DWORD);
416 if (RegQueryValueEx(hkey, name, NULL, NULL, (LPBYTE)&check, &size))
419 return (check == value);
422 static void setperusersecvalues_test(void)
424 PERUSERSECTION peruser;
428 lstrcpy(peruser.szDispName, "displayname");
429 lstrcpy(peruser.szLocale, "locale");
430 lstrcpy(peruser.szStub, "stub");
431 lstrcpy(peruser.szVersion, "1,1,1,1");
432 lstrcpy(peruser.szCompID, "compid");
433 peruser.dwIsInstalled = 1;
434 peruser.bRollback = FALSE;
436 /* try a NULL pPerUser */
439 /* This crashes on systems with IE7 */
440 hr = pSetPerUserSecValues(NULL);
442 ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
443 ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n");
446 /* at the very least, szGUID must be valid */
447 peruser.szGUID[0] = '\0';
448 hr = pSetPerUserSecValues(&peruser);
449 ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
450 ok(!OPEN_GUID_KEY(), "Expected guid key to not exist\n");
452 /* set initial values */
453 lstrcpy(peruser.szGUID, "guid");
454 hr = pSetPerUserSecValues(&peruser);
455 ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
456 ok(OPEN_GUID_KEY(), "Expected guid key to exist\n");
457 ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
458 ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
459 ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n");
460 ok(check_reg_str(guid, "StubPath", "stub"), "Expected stub\n");
461 ok(check_reg_str(guid, "Version", "1,1,1,1"), "Expected 1,1,1,1\n");
462 ok(check_reg_dword(guid, "IsInstalled", 1), "Expected 1\n");
463 ok(!REG_VAL_EXISTS(guid, "OldDisplayName"), "Expected OldDisplayName to not exist\n");
464 ok(!REG_VAL_EXISTS(guid, "OldLocale"), "Expected OldLocale to not exist\n");
465 ok(!REG_VAL_EXISTS(guid, "OldStubPath"), "Expected OldStubPath to not exist\n");
466 ok(!REG_VAL_EXISTS(guid, "OldVersion"), "Expected OldVersion to not exist\n");
467 ok(!REG_VAL_EXISTS(guid, "RealStubPath"), "Expected RealStubPath to not exist\n");
469 /* raise the version, but bRollback is FALSE, so vals not saved */
470 lstrcpy(peruser.szVersion, "2,1,1,1");
471 hr = pSetPerUserSecValues(&peruser);
472 ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
473 ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
474 ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
475 ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n");
476 ok(check_reg_str(guid, "StubPath", "stub"), "Expected stub\n");
477 ok(check_reg_str(guid, "Version", "2,1,1,1"), "Expected 2,1,1,1\n");
478 ok(check_reg_dword(guid, "IsInstalled", 1), "Expected 1\n");
479 ok(!REG_VAL_EXISTS(guid, "OldDisplayName"), "Expected OldDisplayName to not exist\n");
480 ok(!REG_VAL_EXISTS(guid, "OldLocale"), "Expected OldLocale to not exist\n");
481 ok(!REG_VAL_EXISTS(guid, "OldStubPath"), "Expected OldStubPath to not exist\n");
482 ok(!REG_VAL_EXISTS(guid, "OldVersion"), "Expected OldVersion to not exist\n");
483 ok(!REG_VAL_EXISTS(guid, "RealStubPath"), "Expected RealStubPath to not exist\n");
485 /* raise the version again, bRollback is TRUE so vals are saved */
486 peruser.bRollback = TRUE;
487 lstrcpy(peruser.szVersion, "3,1,1,1");
488 hr = pSetPerUserSecValues(&peruser);
489 ok(hr == S_OK, "Expected S_OK, got %d\n", hr);
490 ok(check_reg_str(guid, NULL, "displayname"), "Expected displayname\n");
491 ok(check_reg_str(guid, "ComponentID", "compid"), "Expected compid\n");
492 ok(check_reg_str(guid, "Locale", "locale"), "Expected locale\n");
493 ok(check_reg_dword(guid, "IsInstalled", 1), "Expected 1\n");
494 ok(check_reg_str(guid, "Version", "3,1,1,1"), "Expected 3,1,1,1\n");
497 ok(check_reg_str(guid, "OldDisplayName", "displayname"), "Expected displayname\n");
498 ok(check_reg_str(guid, "OldLocale", "locale"), "Expected locale\n");
499 ok(check_reg_str(guid, "RealStubPath", "stub"), "Expected stub\n");
500 ok(check_reg_str(guid, "OldStubPath", "stub"), "Expected stub\n");
501 ok(check_reg_str(guid, "OldVersion", "2,1,1,1"), "Expected 2,1,1,1\n");
502 ok(check_reg_str(guid, "StubPath",
503 "rundll32.exe advpack.dll,UserInstStubWrapper guid"),
504 "Expected real stub\n");
507 RegDeleteKey(HKEY_LOCAL_MACHINE, GUID_KEY);
512 if (!init_function_pointers())
519 setperusersecvalues_test();
520 translateinfstring_test();
521 translateinfstringex_test();