feat(autorun): add AS_SYSTEM_ON_BOOT autorun type

This commit is contained in:
es3n1n
2025-05-15 21:51:22 +09:00
parent ad032ab0d5
commit 96d0cddf8c
4 changed files with 58 additions and 15 deletions

View File

@@ -5,15 +5,21 @@
#include <Windows.h>
namespace loader {
enum class AutorunType : std::uint8_t {
AS_SYSTEM_ON_BOOT = 0, ///< launch on system boot as NT AUTHORITY\SYSTEM
AS_CURRENT_USER_ON_LOGIN = 1, ///< launch on user login
};
struct Config {
public:
std::string name;
bool disable;
bool verbose;
bool from_autorun;
AutorunType autorun_type;
};
[[nodiscard]] HANDLE inject(std::string_view dll_path, std::string_view proc_name);
[[nodiscard]] bool add_to_autorun();
[[nodiscard]] bool add_to_autorun(AutorunType type);
[[nodiscard]] bool remove_from_autorun();
} // namespace loader