Executing bat file in Wine from bash shell
Executing bat file in Wine from bash shell
I run OS X, and I want to execute a bat file in Wine from within a shell script. Is there a way to do this? Can Wine accept a path to an executable/bat file as an argument?
And can this be done without having to open and close Wine each time the build process is initiated? I'd like to use a currently running Wine instance, if there is one.
And can this be done without having to open and close Wine each time the build process is initiated? I'd like to use a currently running Wine instance, if there is one.
Fine by me, I haven't even written the bat file yet. But I wasn't sure if there was a way to do it without the bat file.doh123 wrote:I'm not sure why you'd want to run a batch file, there has to be an easier way to do what you want.
The bat file would pass some arguments to a CUI tool. Ideally I'd like to do this somehow:
Code: Select all
wine cmd -executable=./path/to.exe -args="$arg1 $arg2"
Wait, I suppose I don't technically need to run cmd! Just as long as there's some way to pass arguments to an exe from the command line:
Code: Select all
wine ./path/to.exe -args="$arg1 $arg2"
you can pass args along just fine...Rezmason wrote:Wait, I suppose I don't technically need to run cmd! Just as long as there's some way to pass arguments to an exe from the command line:
Code: Select all
wine ./path/to.exe -args="$arg1 $arg2"
usually you want to cd into the folder, many programs like you running them from in the folder not just giving the path to them... but most current programs will work either way.
how to pass command line arguments... here is an example using Wine's notepad
wine notepad textfile.txt
will open notepad and pass it the argument to make a new text file called textfile.txt...
as long as the exe knows how to handle the arguments you just stick them on there, no special flags or anything needed.
This thread seems to be very old, most of the bat files should be runnable using .
Code: Select all
wine cmd < path/to/your/file.bat
you can also use start.exe...sieira wrote:This thread seems to be very old, most of the bat files should be runnable using.Code: Select all
wine cmd < path/to/your/file.bat
wine start path/to/your/file.bat