Is there a way to find the default history folder? I thought there was, but I could only find default system folder and default windows folder. thanks in advance.
Is there a way to find the default history folder? I thought there was, but I could only find default system folder and default windows folder. thanks in advance.
HKEY_CURRENT_USER\Software\Microsoft\Windows\Curre ntVersion\Explorer\Shell Folders
Lots of cool shell folders in there.......
Help me out with how to get this value now. I get success on the first function, but the second fails. I don't even know if the second is the correct function.
By the way, the \ in the text are actually double \sPHP Code:
if(
RegOpenKey(
HKEY_CURRENT_USER,
"Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders",
&key) != ERROR_SUCCESS
)
{ MessageBox(hwnd, "Error opening key", "Error", 0); }
if(
RegQueryValue(
key,
"History",
buffer,
&ret) != ERROR_SUCCESS
)
{ MessageBox(hwnd, "Key Reading Error", "Error", 0); }
We figured something similar out later on in the forums, but just to make your question complete:
Code:#include <windows.h> #include <stdio.h> int main() { char HistoryFolder[301]; DWORD DataType = REG_SZ; DWORD BufferLength = 300; HKEY hKey; RegOpenKeyEx(HKEY_CURRENT_USER, "Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Shell Folders", 0, KEY_READ, &hKey); RegQueryValueEx(hKey, "History", 0, &DataType, (BYTE *)HistoryFolder, &BufferLength); MessageBox(NULL, HistoryFolder, "The history folder is..", MB_OK); return 0; }
(Note: The message board broke the subkey string - that is supposed to be a continuous string)