Windows | Apps That Open On Startup

#include <Windows.h> #include <iostream> #include <vector> #include <string>

// Function to add a new startup application to the registry void AddStartupApp(const std::string& appName, const std::string& appPath) HKEY hKey; RegOpenKeyEx(HKEY_LOCAL_MACHINE, "SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run", 0, KEY_WRITE, &hKey); RegSetValue(hKey, appName.c_str(), REG_SZ, (LPBYTE)appPath.c_str(), appPath.size()); RegCloseKey(hKey); apps that open on startup windows