Command line parameters
dank at kegel.com
Thu Jun 7 13:30:26 CDT 2012
> [ How do I launch Windows apps from Unix apps and pass filenames to them?]
> execl (the_path_to_wine, "wine", path_to_the_windows_program, command_line_parameter_for_windows_app, NULL);
Relative unix paths will often work with Windows apps, but
in general, you will have to translate
command_line_parameter_for_windows_app, and any
paths that appear in data files, from Unix to Windows before launching the app.
The winepath utility may help there, or you can translate them yourself
once you know how Wine maps filenames.
Also, I recall being in a situation where I had to put the
commandline in a batch file and do
wine cmd.exe /c foo.bat
because there wasn't another other way to make the windows app
happy... something about the commandline that made me need
to use CreateProcess, and cmd.exe was the easiest way to use CreateProcess.
More information about the wine-devel