2008/9/9 Mike Engelhardt <[EMAIL PROTECTED]>: > Steve, > > >> On Tue, Sep 9, 2008 at 11:24 AM, Mike Engelhardt >> <[EMAIL PROTECTED]> wrote: >>> Is there a supported/recommended manner of launching >>> an X Window System executable with Linux absolute >>> path arguments from a MS Windows application running >>> under Linux & WINE? >> >> There is a script to invoke native apps that have a windows >> association. I don't know if this will really work the way you want. >> If you expect to be able to just click on help and have it invoke xchm >> for chm files, then no but if there is a windows association set and >> your application tries to open the file using the association method, >> like say you have pdf files registered using xpdf and IE tries to Open >> the pdf, then yes it will work. > > I'm do not want to change global associations, I just > want a way to launch a Linux executable from a Windows > program. Right now, I've written the Windows app to > do this: > > char XchmViewer[MAX_PATH] = "Z:\\usr\\bin\\xchm"; > sprintf(cmd, "%s %s", XchmViewer, helpfilepath); > system(cmd); > > Where the helpfilepath is computed to outsmart WINE > trying to outsmart Windows. I also don't like that > I have to use a path like "Z:\\usr\\bin\\xchm" to > invoke /usr/bin/xchm since my app should not need to > know what the drive letters are. > > Since I'm the one writing the Windows app, I would like > to be able to launch a better native Linux app to launch > than WINE's .chm viewer.
Hi Mike, You should you should just do "ShellExecute(helpfilepath)" and set the default value of HKCR\chm.file\shell\open\command to Z:\usr\bin\xchm on install and the user can change this if he or she wishes. I think it is safe to assume that Z: will always map to "/" in Wine. You can always not install the association if Z: isn't mapped to anything. -- Rob Shearman