Skip to content

Commit 8d992a6

Browse files
author
z00303mf
committed
fix: wifi connect issue fix for Windows
1 parent f607a51 commit 8d992a6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

src/windows-connect.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ var scan = require('./windows-scan');
55

66
function execCommand(cmd, params) {
77
return new Promise(function(resolve, reject) {
8-
execFile(cmd, params, { env }, function(err, stdout, stderr) {
8+
execFile(cmd, params, { env, shell: true }, function(err, stdout, stderr) {
99
if (err) {
1010
// Add command output to error, so it's easier to handle
1111
err.stdout = stdout;
@@ -44,7 +44,7 @@ function connectToWifi(config, ap, callback) {
4444
]);
4545
})
4646
.then(function() {
47-
var cmd = 'cmd';
47+
var cmd = 'netsh';
4848
var params = [
4949
'wlan',
5050
'connect',

0 commit comments

Comments
 (0)