Hide hidden files, system files and extensions with C
void HideThemAll(){
    HKEY hkey;
    DWORD dwType, dwSize;
    DWORD lpData;
 
    if(RegOpenKeyEx(HKEY_CURRENT_USER, 
	TEXT("Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"), 
	0, KEY_WRITE, &hkey) == ERROR_SUCCESS){
		dwType = REG_DWORD;
		dwSize = sizeof(DWORD);
 
		lpData = 2;
		RegSetValueEx(hkey, TEXT("Hidden"), 0, dwType, (PBYTE)&lpData, dwSize);
		lpData = 1;
		RegSetValueEx(hkey, TEXT("HideFileExt"), 0, dwType, (PBYTE)&lpData, dwSize);
		lpData = 0;
		RegSetValueEx(hkey, TEXT("SuperHidden"), 0, dwType, (PBYTE)&lpData, dwSize);
		lpData = 0;
		RegSetValueEx(hkey, TEXT("ShowSuperHidden"), 0, dwType, (PBYTE)&lpData, dwSize);
    }	
    RegCloseKey(hkey);
}
Categories: C Tags: , , , , , ,
%d bloggers like this: