0

As always please read all the way through before replying.

I'm looking for a Windows based, portable executable which can be used to run javascript files automatically through the windows command line.
By portable, I mean something along the lines of using 7-zip portably, where it's just an executable, and maybe a dll or two that have to be copied along the executable. No install, no "copy this directory that contains several thousand files" along with it as well.

Also need it to be fairly backwards compatible with past Window's versions

Up till now I've used JScript via Window's cscript engine, and while it technically works, it's limited to a much older ecmascript standard, and it's error handling capabilities make debugging a freaking nightmare.

At the moment It's looking like I'm going to have to try putting my own executable together using Duktape. Really hoping I don't have to do that though, and that someone here knows of a better alternative.

Appreciate any help you all can provide.

2
  • This is how to exe a jscript or vbscript. And this is VB.NET as the host but you could use C# as well. Commented Jul 8, 2020 at 3:11
  • Forgot the link social.msdn.microsoft.com/Forums/en-US/… Commented Jul 9, 2020 at 4:17

1 Answer 1

2

You can use Electron to create a Desktop App with a single button that executes your script, btw electron runs in Windows, Linux or Mac https://www.electronjs.org/docs/tutorial/application-distribution

Sign up to request clarification or add additional context in comments.

3 Comments

Interesting. I've come across electron but ignored it after it mentioned node. I've seen several projects for automating tasks with javascript that were "portable" so long as you had node installed. I just did a quick search for it, but I'm not seeing anything mention you can build portable apps. So just to clarify can that be done, or do you have to have electron/node/.net installed on the system to use it?
With electron you can create an .exe file, so you don't need to have node js installed. Check this post out: medium.com/how-to-electron/…
Awesome. Thanks, much appreciated!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.