Re: run windows program
"Leo Schubert" <[email protected]>
| Newsgroups | gmane.comp.lang.4gl.fourjs.user |
|---|---|
| Message-ID | <000301c5891f$00cbb9b0$0400a8c0@LEOIBM> |
Hi Florencia, if you use the (undocumented) Tcl-Api, then you can just use LET the_command = "shellexec ",param_file CLIPPED --# CALL fgl_uisendcommand(the_command CLIPPED) without the need for the wrapper proc if you are only using WTK under Windows for BDL. However I find the "ShelExec" solution presented earlier pretty neat, because it has also a /WAIT parameter Kind Regards, Leo ----- Original Message ----- From: Florencia Vitale To: [email protected] Sent: Thursday, July 14, 2005 2:26 PM Subject: RE: [fourjs-users] run windows program Hi, I don't know who started this thread because I haven't been reading mails this week, and just trying to catch up. But we use a different approach, that works fine on Win98, XP, etc., since long ago : 1) on a standard library, thats executed on startup on every program, we load a TCL script : LET p_fgldir = FGL_GETENV("FGLDIR") LET p_archenv = p_fgldir CLIPPED, "etc/winstart.tcl" --# CALL fgl_uisendsource(p_archenv) 2) this is the content of "winstart.tcl", which is placed in $FGLDIR/etc : proc win_start { the_file } { shellexec $the_file } 3) and then we have another library function, that receives the filename (complete path) to execute on the PC, and does the following : LET the_command = "win_start ",param_file CLIPPED --# CALL fgl_uisendcommand(the_command CLIPPED) What I do not remember is how we set the path names in case the file is on the PCs (how many "\\" to use), because all examples I've found are from files that are on a web server, so the paths are like : http://web_server/complete_path_with_simple_unix_slash. Hope this helps (of course this doesn't work on Genero, as it's TCL, but then in Genero it works fine with "winexec"). Florencia -----Mensaje original----- De: [email protected] [mailto:[email protected]]En nombre de H.J. Sanders Enviado el: jueves, 14 de julio de 2005 8:56 Para: [email protected] Asunto: RE: [fourjs-users] run windows program How dow we get the fix for the crash bug Henk Sanders -----Oorspronkelijk bericht----- Van: [email protected] [mailto:[email protected]]Namens Brian Grellinger Verzonden: woensdag 13 juli 2005 15:28 Aan: [email protected] Onderwerp: Re: [fourjs-users] run windows program Hmmm . . . We did not implement Genero because of the copy/paste deficiency, yet we use shellexec in a LOT of BDL programs: (variable fglserver contains IP of workstation) let scratch = "rsh ", fglserver clipped, " shellexec C:/filename.xls" run scratch This works like a charm on XP. (BDL 3.53, WTK 3.54.1a) Brian Grellinger I.S. Manager Doosan Infracore America Corp Information Systems >>> [email protected] 07/13/05 08:49AM >>> Hi Brian,ShellExec is only in genero,not BDL. For letting WinExecWait working properly within BDL,the whole commandline must be sent properly LET win_cmnd = "outlook.exe c:\\\\test.eml" (assuming outlook in the path) The crash bug has been fixed meanwhile (error in formatting the error message:-() Kind Regards, Leo ----- Original Message ----- From: Brian Grellinger To: [email protected] Sent: Friday, July 08, 2005 5:43 PM Subject: Re: [fourjs-users] run windows program Shellexec may do it. Brian Grellinger I.S. Manager Doosan Infracore America Corp Information Systems >>> [email protected] 07/08/05 10:39AM >>> Hello list. Does anyone know how to start a windows program from 4js depending on the windows file extension. Like : LET win_cmnd = "c:\\\\test.eml" CALL WinExecWait(win_cmd) returning ... I would like it to start Outlook with the file test.eml but instead 4js crashes. Many thanks Henk Sanders