mirror of
https://github.com/ElectronNET/Electron.NET.git
synced 2026-02-03 21:25:13 +00:00
I'm trying to run the .exe through a bat file, #865
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @mikefz010182 on GitHub (Apr 2, 2023).
Originally assigned to: @GregorBiswanger on GitHub.
Hello everyone, I have an .exe with interface and I want to run it from a bat file from my cmd command list, my .exe file has two text boxes:
Source File
Clue
I want to pass these two parameters through my bat file so that it is executed automatically, someone at some point has done something related or would have some ideas on how I could do it, greetings to all.
when executing my bat file it only opens the program but does not pass my parameters to my interface of my .exe
@GregorBiswanger commented on GitHub (Apr 3, 2023):
Our API leans towards the capabilities of the native Electron. Support for parameters with the native Electron works via command line switches. https://www.electronjs.org/docs/latest/api/command-line-switches
I'll show you how to use the command line switches with Electron.NET here:
https://github.com/ElectronNET/Electron.NET/issues/337#issuecomment-559904002
@GregorBiswanger commented on GitHub (Apr 3, 2023):
Please let me know if the solution helped.
@mikefz010182 commented on GitHub (Apr 3, 2023):
Hi GregaroBiswanger, I'm trying but I'm still stuck with the new script you sent me, I don't know if I'm applying the syntax correctly
@FlorianRappl commented on GitHub (Apr 3, 2023):
Hm - you write JavaScript in a bat file...
Again, follow the steps outlined in the referenced issue:
myapp.exe /args --dog=woof --test=true)app.CommandLine.HasSwitchAsyncwhereappis the global application imported from theelectronpackageThe (2) can also be read / achieved inside Electron.NET. The API has the
CommandLineobject that exposes the functionality from theapp.CommandLineobject.@FlorianRappl commented on GitHub (Nov 1, 2025):
Outdated - use
ElectronNET.CoreandElectronNET.Core.AspNet.See Wiki / What's New.