Release 1.5.29.
[wine] / dlls / shlwapi / tests / shreg.c
1 /* Unit test suite for SHReg* functions
2  *
3  * Copyright 2002 Juergen Schmied
4  *
5  * This library is free software; you can redistribute it and/or
6  * modify it under the terms of the GNU Lesser General Public
7  * License as published by the Free Software Foundation; either
8  * version 2.1 of the License, or (at your option) any later version.
9  *
10  * This library is distributed in the hope that it will be useful,
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
13  * Lesser General Public License for more details.
14  *
15  * You should have received a copy of the GNU Lesser General Public
16  * License along with this library; if not, write to the Free Software
17  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
18  */
19
20 #include <stdarg.h>
21 #include <stdio.h>
22
23 #include "wine/test.h"
24 #include "windef.h"
25 #include "winbase.h"
26 #include "winerror.h"
27 #include "winreg.h"
28 #include "winuser.h"
29 #include "shlwapi.h"
30
31 /* Keys used for testing */
32 #define REG_TEST_KEY        "Software\\Wine\\Test"
33 #define REG_CURRENT_VERSION "Software\\Microsoft\\Windows\\CurrentVersion\\explorer"
34
35 static HMODULE hshlwapi;
36
37 static DWORD (WINAPI *pSHCopyKeyA)(HKEY,LPCSTR,HKEY,DWORD);
38 static DWORD (WINAPI *pSHRegGetPathA)(HKEY,LPCSTR,LPCSTR,LPSTR,DWORD);
39 static LSTATUS (WINAPI *pSHRegGetValueA)(HKEY,LPCSTR,LPCSTR,SRRF,LPDWORD,LPVOID,LPDWORD);
40 static LSTATUS (WINAPI *pSHRegCreateUSKeyW)(LPCWSTR,REGSAM,HUSKEY,PHUSKEY,DWORD);
41
42 static char sTestpath1[] = "%LONGSYSTEMVAR%\\subdir1";
43 static char sTestpath2[] = "%FOO%\\subdir1";
44
45 static const char * sEnvvar1 = "bar";
46 static const char * sEnvvar2 = "ImARatherLongButIndeedNeededString";
47
48 static char sExpTestpath1[MAX_PATH];
49 static char sExpTestpath2[MAX_PATH];
50 static DWORD nExpLen1;
51 static DWORD nExpLen2;
52
53 static const char * sEmptyBuffer ="0123456789";
54
55 /* delete key and all its subkeys */
56 static DWORD delete_key( HKEY hkey, LPCSTR parent, LPCSTR keyname )
57 {
58     HKEY parentKey;
59     DWORD ret;
60
61     RegCloseKey(hkey);
62
63     /* open the parent of the key to close */
64     ret = RegOpenKeyExA( HKEY_CURRENT_USER, parent, 0, KEY_ALL_ACCESS, &parentKey);
65     if (ret != ERROR_SUCCESS)
66         return ret;
67
68     ret = SHDeleteKeyA( parentKey, keyname );
69     RegCloseKey(parentKey);
70
71     return ret;
72 }
73
74 static HKEY create_test_entries(void)
75 {
76         HKEY hKey;
77         DWORD ret;
78         DWORD nExpectedLen1, nExpectedLen2;
79
80         SetEnvironmentVariableA("LONGSYSTEMVAR", sEnvvar1);
81         SetEnvironmentVariableA("FOO", sEnvvar2);
82
83         ret = RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY, &hKey);
84         ok( ERROR_SUCCESS == ret, "RegCreateKeyA failed, ret=%u\n", ret);
85
86         if (hKey)
87         {
88            ok(!RegSetValueExA(hKey,"Test1",0,REG_EXPAND_SZ, (LPBYTE) sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n");
89            ok(!RegSetValueExA(hKey,"Test2",0,REG_SZ, (LPBYTE) sTestpath1, strlen(sTestpath1)+1), "RegSetValueExA failed\n");
90            ok(!RegSetValueExA(hKey,"Test3",0,REG_EXPAND_SZ, (LPBYTE) sTestpath2, strlen(sTestpath2)+1), "RegSetValueExA failed\n");
91         }
92
93         nExpLen1 = ExpandEnvironmentStringsA(sTestpath1, sExpTestpath1, sizeof(sExpTestpath1));
94         nExpLen2 = ExpandEnvironmentStringsA(sTestpath2, sExpTestpath2, sizeof(sExpTestpath2));
95
96         nExpectedLen1 = strlen(sTestpath1) - strlen("%LONGSYSTEMVAR%") + strlen(sEnvvar1) + 1;
97         nExpectedLen2 = strlen(sTestpath2) - strlen("%FOO%") + strlen(sEnvvar2) + 1;
98         /* ExpandEnvironmentStringsA on NT4 returns 2x the correct result */
99         trace("sExplen1 = (%d)\n", nExpLen1);
100         if (nExpectedLen1 != nExpLen1)
101             trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath1, nExpectedLen1 );
102
103         trace("sExplen2 = (%d)\n", nExpLen2);
104         if (nExpectedLen2 != nExpLen2)
105             trace( "Expanding %s failed (expected %d) - known bug in NT4\n", sTestpath2, nExpectedLen2 );       
106
107         /* Make sure we carry on with correct values */
108         nExpLen1 = nExpectedLen1; 
109         nExpLen2 = nExpectedLen2;
110         return hKey;
111 }
112
113 static void test_SHGetValue(void)
114 {
115         DWORD dwSize;
116         DWORD dwType;
117         DWORD dwRet;
118         char buf[MAX_PATH];
119
120         strcpy(buf, sEmptyBuffer);
121         dwSize = MAX_PATH;
122         dwType = -1;
123         dwRet = SHGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", &dwType, buf, &dwSize);
124         ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%u\n", dwRet);
125         ok( 0 == strcmp(sExpTestpath1, buf) ||
126             broken(0 == strcmp(sTestpath1, buf)), /* IE4.x */
127             "Comparing of (%s) with (%s) failed\n", buf, sExpTestpath1);
128         ok( REG_SZ == dwType ||
129             broken(REG_EXPAND_SZ == dwType), /* IE4.x */
130             "Expected REG_SZ, got (%u)\n", dwType);
131
132         strcpy(buf, sEmptyBuffer);
133         dwSize = MAX_PATH;
134         dwType = -1;
135         dwRet = SHGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", &dwType, buf, &dwSize);
136         ok( ERROR_SUCCESS == dwRet, "SHGetValueA failed, ret=%u\n", dwRet);
137         ok( 0 == strcmp(sTestpath1, buf) , "Comparing of (%s) with (%s) failed\n", buf, sTestpath1);
138         ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
139 }
140
141 static void test_SHRegGetValue(void)
142 {
143     LSTATUS ret;
144     DWORD size, type;
145     char data[MAX_PATH];
146
147     if(!pSHRegGetValueA)
148         return;
149
150     size = MAX_PATH;
151     ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_EXPAND_SZ, &type, data, &size);
152     ok(ret == ERROR_INVALID_PARAMETER, "SHRegGetValue failed, ret=%u\n", ret);
153
154     size = MAX_PATH;
155     ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_SZ, &type, data, &size);
156     ok(ret == ERROR_SUCCESS, "SHRegGetValue failed, ret=%u\n", ret);
157     ok(!strcmp(data, sExpTestpath1), "data = %s, expected %s\n", data, sExpTestpath1);
158     ok(type == REG_SZ, "type = %d, expected REG_SZ\n", type);
159
160     size = MAX_PATH;
161     ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", SRRF_RT_REG_DWORD, &type, data, &size);
162     ok(ret == ERROR_UNSUPPORTED_TYPE, "SHRegGetValue failed, ret=%u\n", ret);
163
164     size = MAX_PATH;
165     ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_EXPAND_SZ, &type, data, &size);
166     ok(ret == ERROR_INVALID_PARAMETER, "SHRegGetValue failed, ret=%u\n", ret);
167
168     size = MAX_PATH;
169     ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_SZ, &type, data, &size);
170     ok(ret == ERROR_SUCCESS, "SHRegGetValue failed, ret=%u\n", ret);
171     ok(!strcmp(data, sTestpath1), "data = %s, expected %s\n", data, sTestpath1);
172     ok(type == REG_SZ, "type = %d, expected REG_SZ\n", type);
173
174     size = MAX_PATH;
175     ret = pSHRegGetValueA(HKEY_CURRENT_USER, REG_TEST_KEY, "Test2", SRRF_RT_REG_QWORD, &type, data, &size);
176     ok(ret == ERROR_UNSUPPORTED_TYPE, "SHRegGetValue failed, ret=%u\n", ret);
177 }
178
179 static void test_SHGetRegPath(void)
180 {
181         char buf[MAX_PATH];
182         DWORD dwRet;
183
184         if (!pSHRegGetPathA)
185                 return;
186
187         strcpy(buf, sEmptyBuffer);
188         dwRet = (*pSHRegGetPathA)(HKEY_CURRENT_USER, REG_TEST_KEY, "Test1", buf, 0);
189         ok( ERROR_SUCCESS == dwRet, "SHRegGetPathA failed, ret=%u\n", dwRet);
190         ok( 0 == strcmp(sExpTestpath1, buf) , "Comparing (%s) with (%s) failed\n", buf, sExpTestpath1);
191 }
192
193 static void test_SHQueryValueEx(void)
194 {
195         HKEY hKey;
196         DWORD dwSize;
197         DWORD dwType;
198         char buf[MAX_PATH];
199         DWORD dwRet;
200         const char * sTestedFunction = "";
201         DWORD nUsedBuffer1,nUsedBuffer2;
202
203         sTestedFunction = "RegOpenKeyExA";
204         dwRet = RegOpenKeyExA(HKEY_CURRENT_USER, REG_TEST_KEY, 0,  KEY_QUERY_VALUE, &hKey);
205         ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
206
207         /****** SHQueryValueExA ******/
208
209         sTestedFunction = "SHQueryValueExA";
210         nUsedBuffer1 = max(strlen(sExpTestpath1)+1, strlen(sTestpath1)+1);
211         nUsedBuffer2 = max(strlen(sExpTestpath2)+1, strlen(sTestpath2)+1);
212         /*
213          * Case 1.1 All arguments are NULL
214          */
215         dwRet = SHQueryValueExA( hKey, "Test1", NULL, NULL, NULL, NULL);
216         ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
217
218         /*
219          * Case 1.2 dwType is set
220          */
221         dwType = -1;
222         dwRet = SHQueryValueExA( hKey, "Test1", NULL, &dwType, NULL, NULL);
223         ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
224         ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
225
226         /*
227          * dwSize is set
228          * dwExpanded < dwUnExpanded
229          */
230         dwSize = 6;
231         dwRet = SHQueryValueExA( hKey, "Test1", NULL, NULL, NULL, &dwSize);
232         ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
233         ok( dwSize == nUsedBuffer1, "Buffer sizes (%u) and (%u) are not equal\n", dwSize, nUsedBuffer1);
234
235         /*
236          * dwExpanded > dwUnExpanded
237          */
238         dwSize = 6;
239         dwRet = SHQueryValueExA( hKey, "Test3", NULL, NULL, NULL, &dwSize);
240         ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
241         ok( dwSize >= nUsedBuffer2 ||
242             broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE4.x */
243             "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
244
245         /*
246          * Case 1 string shrinks during expanding
247          */
248         strcpy(buf, sEmptyBuffer);
249         dwSize = 6;
250         dwType = -1;
251         dwRet = SHQueryValueExA( hKey, "Test1", NULL, &dwType, buf, &dwSize);
252         ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
253         ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer);
254         ok( dwSize == nUsedBuffer1, "Buffer sizes (%u) and (%u) are not equal\n", dwSize, nUsedBuffer1);
255         ok( REG_SZ == dwType ||
256             broken(REG_EXPAND_SZ == dwType), /* < IE6 */
257             "Expected REG_SZ, got (%u)\n", dwType);
258
259         /*
260          * string grows during expanding
261          * dwSize is smaller than the size of the unexpanded string
262          */
263         strcpy(buf, sEmptyBuffer);
264         dwSize = 6;
265         dwType = -1;
266         dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
267         ok( ERROR_MORE_DATA == dwRet, "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
268         ok( 0 == strcmp(sEmptyBuffer, buf) , "Comparing (%s) with (%s) failed\n", buf, sEmptyBuffer);
269         ok( dwSize >= nUsedBuffer2 ||
270             broken(dwSize == (strlen(sTestpath2) + 1)), /* < IE6 */
271             "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
272         ok( REG_SZ == dwType ||
273             broken(REG_EXPAND_SZ == dwType), /* < IE6 */
274             "Expected REG_SZ, got (%u)\n", dwType);
275
276         /*
277          * string grows during expanding
278          * dwSize is larger than the size of the unexpanded string, but
279          * smaller than the part before the backslash. If the unexpanded
280          * string fits into the buffer, it can get cut when expanded.
281          */
282         strcpy(buf, sEmptyBuffer);
283         dwSize = strlen(sEnvvar2) - 2;
284         dwType = -1;
285         dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
286         ok( ERROR_MORE_DATA == dwRet ||
287             broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */
288             broken(ERROR_SUCCESS == dwRet), /* < IE5.5*/
289             "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
290
291         todo_wine
292         {
293                 ok( (0 == strcmp("", buf)) || (0 == strcmp(sTestpath2, buf)),
294                     "Expected empty or unexpanded string (win98), got (%s)\n", buf); 
295         }
296
297         ok( dwSize >= nUsedBuffer2 ||
298             broken(dwSize == (strlen("") + 1)), /* < IE 5.5 */
299             "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
300         ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
301
302         /*
303          * string grows during expanding
304          * dwSize is larger than the size of the part before the backslash,
305          * but smaller than the expanded string. If the unexpanded string fits
306          * into the buffer, it can get cut when expanded.
307          */
308         strcpy(buf, sEmptyBuffer);
309         dwSize = nExpLen2 - 4;
310         dwType = -1;
311         dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, buf, &dwSize);
312         ok( ERROR_MORE_DATA == dwRet ||
313             broken(ERROR_ENVVAR_NOT_FOUND == dwRet) || /* IE5.5 */
314             broken(ERROR_SUCCESS == dwRet), /* < IE5.5 */
315             "Expected ERROR_MORE_DATA, got (%u)\n", dwRet);
316
317         todo_wine
318         {
319             ok( (0 == strcmp("", buf)) || (0 == strcmp(sEnvvar2, buf)) ||
320                 broken(0 == strcmp(sTestpath2, buf)), /* IE 5.5 */
321                 "Expected empty or first part of the string \"%s\", got \"%s\"\n", sEnvvar2, buf);
322         }
323
324         ok( dwSize >= nUsedBuffer2 ||
325             broken(dwSize == (strlen(sEnvvar2) + 1)) || /* IE4.01 SP1 (W98) and IE5 (W98SE) */
326             broken(dwSize == (strlen("") + 1)), /* IE4.01 (NT4) and IE5.x (W2K) */
327             "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
328         ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
329
330         /*
331          * The buffer is NULL but the size is set
332          */
333         strcpy(buf, sEmptyBuffer);
334         dwSize = 6;
335         dwType = -1;
336         dwRet = SHQueryValueExA( hKey, "Test3", NULL, &dwType, NULL, &dwSize);
337         ok( ERROR_SUCCESS == dwRet, "%s failed, ret=%u\n", sTestedFunction, dwRet);
338         ok( dwSize >= nUsedBuffer2 ||
339             broken(dwSize == (strlen(sTestpath2) + 1)), /* IE4.01 SP1 (Win98) */
340             "Buffer size (%u) should be >= (%u)\n", dwSize, nUsedBuffer2);
341         ok( REG_SZ == dwType , "Expected REG_SZ, got (%u)\n", dwType);
342
343         RegCloseKey(hKey);
344 }
345
346 static void test_SHCopyKey(void)
347 {
348         HKEY hKeySrc, hKeyDst;
349         DWORD dwRet;
350
351         if (!pSHCopyKeyA)
352         {
353             win_skip("SHCopyKeyA is not available\n");
354             return;
355         }
356
357         /* Delete existing destination sub keys */
358         hKeyDst = NULL;
359         if (!RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst) && hKeyDst)
360         {
361                 SHDeleteKeyA(hKeyDst, NULL);
362                 RegCloseKey(hKeyDst);
363         }
364
365         hKeyDst = NULL;
366         dwRet = RegCreateKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination", &hKeyDst);
367         if (dwRet || !hKeyDst)
368         {
369                 ok( 0, "Destination couldn't be created, RegCreateKeyA returned (%u)\n", dwRet);
370                 return;
371         }
372
373         hKeySrc = NULL;
374         dwRet = RegOpenKeyA(HKEY_LOCAL_MACHINE, REG_CURRENT_VERSION, &hKeySrc);
375         if (dwRet || !hKeySrc)
376         {
377                 ok( 0, "Source couldn't be opened, RegOpenKeyA returned (%u)\n", dwRet);
378                 RegCloseKey(hKeyDst);
379                 return;
380         }
381
382         dwRet = (*pSHCopyKeyA)(hKeySrc, NULL, hKeyDst, 0);
383         ok ( ERROR_SUCCESS == dwRet, "Copy failed, ret=(%u)\n", dwRet);
384
385         RegCloseKey(hKeySrc);
386         RegCloseKey(hKeyDst);
387
388         /* Check we copied the sub keys, i.e. something that's on every windows system (including Wine) */
389         hKeyDst = NULL;
390         dwRet = RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\CopyDestination\\Shell Folders", &hKeyDst);
391         if (dwRet || !hKeyDst)
392         {
393                 ok ( 0, "Copy couldn't be opened, RegOpenKeyA returned (%u)\n", dwRet);
394                 return;
395         }
396
397         /* And the we copied the values too */
398         ok(!SHQueryValueExA(hKeyDst, "Common AppData", NULL, NULL, NULL, NULL), "SHQueryValueExA failed\n");
399
400         RegCloseKey(hKeyDst);
401 }
402
403 static void test_SHDeleteKey(void)
404 {
405     HKEY hKeyTest, hKeyS;
406     DWORD dwRet;
407     int sysfail = 1;
408
409     if (!RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY, &hKeyTest))
410     {
411         if (!RegCreateKey(hKeyTest, "ODBC", &hKeyS))
412         {
413             HKEY hKeyO;
414
415             if (!RegCreateKey(hKeyS, "ODBC.INI", &hKeyO))
416             {
417                 RegCloseKey (hKeyO);
418
419                 if (!RegCreateKey(hKeyS, "ODBCINST.INI", &hKeyO))
420                 {
421                     RegCloseKey (hKeyO);
422                     sysfail = 0;
423                 }
424             }
425             RegCloseKey (hKeyS);
426         }
427         RegCloseKey (hKeyTest);
428     }
429
430     if (!sysfail)
431     {
432
433         dwRet = SHDeleteKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\ODBC");
434         ok ( ERROR_SUCCESS == dwRet, "SHDeleteKey failed, ret=(%u)\n", dwRet);
435
436         dwRet = RegOpenKeyA(HKEY_CURRENT_USER, REG_TEST_KEY "\\ODBC", &hKeyS);
437         ok ( ERROR_FILE_NOT_FOUND == dwRet, "SHDeleteKey did not delete\n");
438
439         if (dwRet == ERROR_SUCCESS)
440             RegCloseKey (hKeyS);
441     }
442     else
443         ok( 0, "Could not set up SHDeleteKey test\n");
444 }
445
446 static void test_SHRegCreateUSKeyW(void)
447 {
448     static const WCHAR subkeyW[] = {'s','u','b','k','e','y',0};
449     LONG ret;
450
451     if (!pSHRegCreateUSKeyW)
452     {
453         win_skip("SHRegCreateUSKeyW not available\n");
454         return;
455     }
456
457     ret = pSHRegCreateUSKeyW(subkeyW, KEY_ALL_ACCESS, NULL, NULL, SHREGSET_FORCE_HKCU);
458     ok(ret == ERROR_INVALID_PARAMETER, "got %d\n", ret);
459 }
460
461 START_TEST(shreg)
462 {
463     HKEY hkey = create_test_entries();
464
465     if (!hkey) return;
466
467     hshlwapi = GetModuleHandleA("shlwapi.dll");
468
469     /* SHCreateStreamOnFileEx was introduced in shlwapi v6.0 */
470     if(!GetProcAddress(hshlwapi, "SHCreateStreamOnFileEx")){
471         win_skip("Too old shlwapi version\n");
472         return;
473     }
474
475     pSHCopyKeyA = (void*)GetProcAddress(hshlwapi,"SHCopyKeyA");
476     pSHRegGetPathA = (void*)GetProcAddress(hshlwapi,"SHRegGetPathA");
477     pSHRegGetValueA = (void*)GetProcAddress(hshlwapi,"SHRegGetValueA");
478     pSHRegCreateUSKeyW = (void*)GetProcAddress(hshlwapi, "SHRegCreateUSKeyW");
479
480     test_SHGetValue();
481     test_SHRegGetValue();
482     test_SHQueryValueEx();
483     test_SHGetRegPath();
484     test_SHCopyKey();
485     test_SHDeleteKey();
486     test_SHRegCreateUSKeyW();
487
488     delete_key( hkey, "Software\\Wine", "Test" );
489 }