diff options
| author | a1xd <[email protected]> | 2020-09-27 22:51:43 -0400 |
|---|---|---|
| committer | a1xd <[email protected]> | 2020-09-27 22:51:43 -0400 |
| commit | a0be98df9546733c3f9e476b808e6c8f8eb843c4 (patch) | |
| tree | 89f5966e33f8ff85b987d32075e912923acfd618 /installer/installer.cpp | |
| parent | Fix for second dot not clearing: (diff) | |
| download | rawaccel-a0be98df9546733c3f9e476b808e6c8f8eb843c4.tar.xz rawaccel-a0be98df9546733c3f9e476b808e6c8f8eb843c4.zip | |
add os detection to installer
it --probably-- doesn't run installation on anything older than W10
Diffstat (limited to 'installer/installer.cpp')
| -rw-r--r-- | installer/installer.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/installer/installer.cpp b/installer/installer.cpp index ac426af..03c8881 100644 --- a/installer/installer.cpp +++ b/installer/installer.cpp @@ -1,7 +1,9 @@ + + #include <iostream> #include <utility-install.hpp> - +#include <VersionHelpers.h> void add_service(const fs::path& target) { SC_HANDLE schSCManager = OpenSCManager( NULL, // local computer @@ -41,6 +43,9 @@ void add_service(const fs::path& target) { int main() { try { + if (!IsWindows10OrGreater()) { + throw std::runtime_error("OS not supported, you need at least Windows 10"); + } fs::path source = fs::path(L"driver") / DRIVER_FILE_NAME; if (!fs::exists(source)) { |