title: Registry entry is deleted after reboot
body: <p>I save directory path to registry with this code:</p>
  
  <pre><code>HKEY hKey;
  RegCreateKeyEx(HKEY_CURRENT_USER, L"Software\\BArtWell\\MyApp", 0, NULL, REG_OPTION_VOLATILE, KEY_WRITE, NULL, &amp;hKey, NULL);
  RegSetValueEx(hKey,L"Directory",0,REG_SZ,(LPBYTE)sz,(DWORD)wcslen(sz)*sizeof(wchar_t));
  RegCloseKey(hKey);
  </code></pre>
  
  <p>And it is working fine before reboot. But after reboot path HKCU\Software\BArtWell\MyApp doesn't exists. Tested on XP and Windows7 with same result. What I do wrong?</p>