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

Function Ext2SetAutoRunUserList

Ext2Mgr/enumDisk.cpp:5113–5140  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5111}
5112
5113BOOL Ext2SetAutoRunUserList(CHAR *userList)
5114{
5115 HKEY key;
5116 CHAR keyPath[MAX_PATH] ;
5117 LONG status;
5118
5119 strcpy (keyPath, "SYSTEM\\CurrentControlSet\\Services\\Ext2Fsd\\Parameters") ;
5120 status = ::RegOpenKeyEx (HKEY_LOCAL_MACHINE,
5121 keyPath,
5122 0,
5123 KEY_ALL_ACCESS | KEY_WOW64_64KEY,
5124 &key) ;
5125 if (status != ERROR_SUCCESS) {
5126 goto errorout;
5127 }
5128
5129 status = RegSetValueEx( key, "AutorunUsers", 0, REG_SZ,
5130 (BYTE *)userList, (int)strlen(userList));
5131 if (status != ERROR_SUCCESS) {
5132 goto errorout;
5133 }
5134
5135errorout:
5136
5137 RegCloseKey(key) ;
5138
5139 return (status == ERROR_SUCCESS);
5140}
5141
5142TCHAR *
5143Ext2StrStr(TCHAR *s, TCHAR *t)

Callers 1

Ext2SetAppAutorunVistaFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected