Skip to content
Permalink
Browse files

win: prevent node from running on Windows Vista or earlier

Ref: #3804

PR-URL: #5167
Reviewed-By: rvagg - Rod Vagg <rod@vagg.org>
Reviewed-By: joaocgreis - João Reis <reis@janeasystems.com>
  • Loading branch information...
orangemocha committed Feb 10, 2016
1 parent 55db190 commit 1cf26c036daf438ea50f0d7aa4984f8d67fa792b
Showing with 8 additions and 0 deletions.
  1. +8 −0 src/node_main.cc
@@ -1,7 +1,15 @@
#include "node.h"

#ifdef _WIN32
#include <VersionHelpers.h>

int wmain(int argc, wchar_t *wargv[]) {
if (!IsWindows7OrGreater()) {
fprintf(stderr, "This application is only supported on Windows 7, "
"Windows Server 2008 R2, or higher.");
exit(1);
}

// Convert argv to to UTF8
char** argv = new char*[argc];
for (int i = 0; i < argc; i++) {

0 comments on commit 1cf26c0

Please sign in to comment.
You can’t perform that action at this time.