MCPcopy Create free account
hub / github.com/bobranten/Ext4Fsd / Ext2RunMgrForCurrentUserXP

Function Ext2RunMgrForCurrentUserXP

Ext2Mgr/enumDisk.cpp:4990–5026  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4988#define EXT2_MANAGER_NAME "Ext2 Volume Manager"
4989
4990BOOL Ext2RunMgrForCurrentUserXP()
4991{
4992 HKEY key ;
4993 CHAR keyPath[MAX_PATH] ;
4994 LONG status ;
4995 DWORD type, len = MAX_PATH;
4996 BOOL rc = FALSE;
4997
4998 CHAR appPath[MAX_PATH] ;
4999
5000 GetModuleFileName(NULL, appPath, MAX_PATH - 6);
5001 strcat(appPath, " -quiet");
5002
5003 strcpy (keyPath, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run") ;
5004 status = RegOpenKeyEx (HKEY_LOCAL_MACHINE,
5005 keyPath,
5006 0,
5007 KEY_ALL_ACCESS,
5008 &key) ;
5009
5010 if (status != ERROR_SUCCESS) {
5011 return FALSE;
5012 }
5013
5014 status = RegQueryValueEx( key, EXT2_MANAGER_NAME, 0, &type,
5015 (BYTE *)appPath, &len);
5016 if (status != ERROR_SUCCESS) {
5017 goto errorout;
5018 }
5019
5020 rc = TRUE;
5021
5022errorout:
5023
5024 RegCloseKey (key) ;
5025 return rc;
5026}
5027
5028BOOL
5029Ext2SetAppAutorunXP(BOOL bInstall)

Callers 1

Ext2RunMgrForCurrentUserFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected