| 5111 | } |
| 5112 | |
| 5113 | BOOL 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 | |
| 5135 | errorout: |
| 5136 | |
| 5137 | RegCloseKey(key) ; |
| 5138 | |
| 5139 | return (status == ERROR_SUCCESS); |
| 5140 | } |
| 5141 | |
| 5142 | TCHAR * |
| 5143 | Ext2StrStr(TCHAR *s, TCHAR *t) |
no outgoing calls
no test coverage detected