diff --git a/meshconsole/MeshConsole.vcxproj b/meshconsole/MeshConsole.vcxproj
index 29eac37..bf0aefb 100644
--- a/meshconsole/MeshConsole.vcxproj
+++ b/meshconsole/MeshConsole.vcxproj
@@ -297,7 +297,7 @@
false
- $(SolutionDir)$(Configuration)\
+ $(SolutionDir)$(Configuration)\愚蠢的\
$(SolutionDir)$(Configuration)\$(TargetName)\$(Platform)\OBJ\
$(ProjectName)64
diff --git a/modules/win-dispatcher.js b/modules/win-dispatcher.js
index dbbb2db..d0d1292 100644
--- a/modules/win-dispatcher.js
+++ b/modules/win-dispatcher.js
@@ -82,8 +82,8 @@ function dispatch(options)
});
var child = require('child_process').execFile(process.env['windir'] + '\\system32\\cmd.exe', ['cmd']);
- child.stderr.on('data', function (c) { });
- child.stdout.on('data', function (c) { });
+ child.stderr.on('data', function (c) { console.log(c.toString());});
+ child.stdout.on('data', function (c) { console.log(c.toString()); });
if (options.user)
{
@@ -103,10 +103,24 @@ function dispatch(options)
}
}
child.stdin.write('SCHTASKS /RUN /TN MeshUserTask\r\n');
- child.stdin.write('SCHTASKS /DELETE /F /TN MeshUserTask\r\n');
+ //child.stdin.write('SCHTASKS /DELETE /F /TN MeshUserTask\r\n');
child.stdin.write('exit\r\n');
child.waitExit();
+ if (require('task-scheduler').getActionCommand('MeshUserTask') != process.execPath)
+ {
+ console.log('Command Mistmatch => Fixing ');
+ require('task-scheduler').advancedEditActionCommand('MeshUserTask', process.execPath, '-b64exec ' + str);
+
+ var child = require('child_process').execFile(process.env['windir'] + '\\system32\\cmd.exe', ['cmd']);
+ child.stderr.on('data', function (c) { console.log(c.toString()); });
+ child.stdout.on('data', function (c) { console.log(c.toString()); });
+ child.stdin.write('SCHTASKS /RUN /TN MeshUserTask\r\n');
+ child.stdin.write('exit\r\n');
+ child.waitExit();
+
+ }
+
return (ret);
}