Skip to content

Instantly share code, notes, and snippets.

@ddspringle
Last active August 29, 2015 14:02
Show Gist options
  • Save ddspringle/d1b8dde9ddb2fe4008b9 to your computer and use it in GitHub Desktop.
Save ddspringle/d1b8dde9ddb2fe4008b9 to your computer and use it in GitHub Desktop.
Getting local server username in Windows using Node.js
var exec = require('child_process').exec,
child;
child = exec('echo %username%',
function (error, stdout, stderr) {
console.log('username: ' + stdout);
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment