follow these manual steps:
--------------------------------------------------------------------
Au.Types.AuException: Failed. %1 is not a valid Win32 application. (193).
1
--------------------------------------------------------------------
Is there any other simple solution?
Note: pm2 is a module of node.js, and it seems there is no pm2.exe file in the above folder.
https://i.ibb.co/F5jHsNZ/pm2.png
There is still an error message using the following code.
-------------------------------------------------------------------------
C:\Users\Administrator\AppData\Roaming\npm\pm2:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at internalCompileFunction (node:internal/vm:128:18)
at wrapSafe (node:internal/modules/cjs/loader:1280:20)
at Module._compile (node:internal/modules/cjs/loader:1332:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49
Node.js v20.12.2
1
-------------------------------------------------------------------------
- Open the D:\RPA\XX folder.
- Launch cmd.exe in the current folder.
- Enter the command: pm2 start dist/index.js --name "AA"
- Successfully execute the program I need.
--------------------------------------------------------------------
Au.Types.AuException: Failed. %1 is not a valid Win32 application. (193).
1
--------------------------------------------------------------------
Is there any other simple solution?
Note: pm2 is a module of node.js, and it seems there is no pm2.exe file in the above folder.
https://i.ibb.co/F5jHsNZ/pm2.png
// script "cmd2.cs"
//.
script.setup(trayIcon: true, sleepExit: true, exitKey: KKey.Pause);
//..
print.clear();
string nodePath = @"C:\Program Files\nodejs\node.exe";
string pm2Path = $@"{folders.RoamingAppData}\npm\pm2"; //C:\Users\Administrator\AppData\Roaming\npm
string curDir = @"D:\RPA\XX";
string arg = """
start dist/index.js --name "AA"
""";
int r = run.console(pm2Path,arg, curDir);
print.it(r);
There is still an error message using the following code.
-------------------------------------------------------------------------
C:\Users\Administrator\AppData\Roaming\npm\pm2:2
basedir=$(dirname "$(echo "$0" | sed -e 's,\\,/,g')")
^^^^^^^
SyntaxError: missing ) after argument list
at internalCompileFunction (node:internal/vm:128:18)
at wrapSafe (node:internal/modules/cjs/loader:1280:20)
at Module._compile (node:internal/modules/cjs/loader:1332:27)
at Module._extensions..js (node:internal/modules/cjs/loader:1427:10)
at Module.load (node:internal/modules/cjs/loader:1206:32)
at Module._load (node:internal/modules/cjs/loader:1022:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:135:12)
at node:internal/main/run_main_module:28:49
Node.js v20.12.2
1
-------------------------------------------------------------------------
// script "cmd3.cs"
//.
script.setup(trayIcon: true, sleepExit: true, exitKey: KKey.Pause);
//..
print.clear();
string nodePath = @"C:\Program Files\nodejs\node.exe";
string pm2Path = $@"{folders.RoamingAppData}\npm\pm2"; //C:\Users\Administrator\AppData\Roaming\npm
string curDir = @"D:\RPA\XX";
string arg = $"""
{pm2Path} start dist/index.js --name "AA"
""";
int r = run.console(nodePath, arg, curDir);
print.it(r);