Gert van den Berg wrote: > On Mon, Nov 30, 2009 at 17:10, fachamix <wineforum-user@xxxxxxxxxx> wrote: > > > Code: > > #include <stdio.h> > > #include <stdlib.h> > > > > int main() > > { > > Â Â printf("probando ejecutable"); > > Â Â printf("llamando a ABIWORD desde wine ..."); > > Â Â system("/bin/sh -c \"/script.run file.txt\""); > > Â Â return 0; > > } > > > > works perfectly > > > > > any reason why its necessary to involve a shell? > > Just a note: You might want to use http://wiki.winehq.org/winepath if > paths get involved... > > In perl what would be: (emulating backtick is something I haven't > figured out in C) > my $filename = `winepath "file.txt"`; # this would be where to put the > windows path > system('/usr/bin/abiword',($filename)); # the multi-parameter form > doesn't have quoting issues... > > (Standard system does not seem to support it, but one of exec & > friends might...) > > Gert perl does not adjust to this problem, because I already have a WINXP compiled program in C++