Home > OS >  Windows 7 by modifying the registry to hide under the drive, not through the restart explorer. Exe c
Windows 7 by modifying the registry to hide under the drive, not through the restart explorer. Exe c

Time:10-05

Everybody:
Ask a question:
Windows 7 by modifying the registry to hide under the drive, not through the restart explorer. Exe can take effect immediately? Now I through the restart explorer. Exe can be achieved, but the screen will flash once, want to through other ways to realize, has a way of SendMessageTimeout online, but bad to use, not much said, now will all code list:
Int MAX_SIZE=100;
Hkeys hkeys;
Char szBuf [80].
DWORD dwDword;
Long lRet;

LRet=RegOpenKeyEx (HKEY_CURRENT_USER,
"Software \ \ Microsoft \ \ Windows \ \ CurrentVersion \ \ Policies \ \ Explorer",
0,
KEY_ALL_ACCESS,
& Hkeys);
If (lRet!=ERROR_SUCCESS)
{
Return FALSE;
}

DWORD bt=0;
Bt |=(DWORD) (1 & lt; & lt; Logicdisk);

DWORD dwSize=4;
RegSetValueEx (hkeys,
"NoDrives,"
0,
REG_DWORD,
(LPBYTE) & amp; Bt
, sizeof (DWORD));
RegCloseKey (hkeys);

//restartExplorer ();
DWORD dwResult;
DWORD valueError=SendMessageTimeout (HWND_BROADCAST, WM_SETTINGCHANGE, 0, LPARAM (" Policy "), SMTO_ABORTIFHUNG, 5000, & amp; DwResult);

Return ret.

CodePudding user response:

His first cap

CodePudding user response:

Impossible, you have to restart the explorer to work
  • Related