原文:
更改开机默认不显示explorer.exe,直接启动自己写的EXE程序方法
CRegKey key;
CString cstrKeyPath = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon";
CString cstrKeyName = "Shell";
return false;
}
if(key.SetStringValue(cstrKeyName, _cstrReg,REG_SZ) != ERROR_SUCCESS)
{
return false;
}
key.Close();
return true;
}
更改开机默认不显示explorer.exe,直接启动自己写的EXE程序的函数:
bool UpdateWinlogon(CString _cstrReg)
{CRegKey key;
CString cstrKeyPath = "SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\Winlogon";
CString cstrKeyName = "Shell";
if(key.Open(HKEY_LOCAL_MACHINE, cstrKeyPath,
KEY_SET_VALUE|KEY_WOW64_64KEY) != ERROR_SUCCESS)
{return false;
}
if(key.SetStringValue(cstrKeyName, _cstrReg,REG_SZ) != ERROR_SUCCESS)
{
return false;
}
key.Close();
return true;
}