diff --git a/src/cryfs-cli/main.cpp b/src/cryfs-cli/main.cpp index c3fe0a72..3b4cc667 100644 --- a/src/cryfs-cli/main.cpp +++ b/src/cryfs-cli/main.cpp @@ -5,6 +5,7 @@ #if defined(_MSC_VER) #include +#include #else #include #endif @@ -18,12 +19,18 @@ using std::make_shared; using std::cerr; int main(int argc, const char *argv[]) { +#if defined(_MSC_VER) + if (!IsWindows10OrGreater()) { + std::cerr << "CryFS is currently only supported on Windows 10 (or later)." << std::endl; + } +#endif + try { auto &keyGenerator = Random::OSRandom(); #if defined(_MSC_VER) - auto httpClient = make_unique_ref(); + auto httpClient = make_unique_ref(); #else - auto httpClient = make_unique_ref(); + auto httpClient = make_unique_ref(); #endif return Cli(keyGenerator, SCrypt::DefaultSettings, make_shared()) .main(argc, argv, std::move(httpClient), []{});