Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent node from running and installing on Windows Vista or earlier #5167

Closed
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
win: prevent node from running on Windows Vista or earlier
Ref: #3804
  • Loading branch information
orangemocha committed Feb 10, 2016
commit 96ab594dcdb34c1c70c444498c0cda5cdc5e6342
8 changes: 8 additions & 0 deletions src/node_main.cc
Original file line number Diff line number Diff line change
@@ -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++) {
Expand Down