From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-0.9 required=3.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no autolearn_force=no version=3.4.6 Path: eternal-september.org!reader02.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED.rrsoftware.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: How to call a Windows executable from Ada? Date: Wed, 8 Dec 2021 23:09:55 -0600 Organization: JSA Research & Innovation Message-ID: References: <71f3752c-40a2-4678-9451-1223a776b384n@googlegroups.com> Injection-Date: Thu, 9 Dec 2021 05:09:56 -0000 (UTC) Injection-Info: franka.jacob-sparre.dk; posting-host="rrsoftware.com:24.196.82.226"; logging-data="10906"; mail-complaints-to="news@jacob-sparre.dk" X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.7246 Xref: reader02.eternal-september.org comp.lang.ada:63207 List-Id: It's hard to say anything definitive without seeing the code that you tried. I haven't found a program that you couldn't run from Ada (using the Janus/Ada facilities; GNAT's are more extensive so I wouldn't expect any difference there), but some things require care. I've definitely never found anything that you can't run by starting a command line processor; that doesn't allow the real-time capture of the results by the calling program but that wouldn't make sense with Winword.exe anyway. Randy. "Marius Amado-Alves" wrote in message news:71f3752c-40a2-4678-9451-1223a776b384n@googlegroups.com... Any *effectively working* solution for calling an external Windows executable, with arguments, from inside Ada? For example, the following command runs fine when given on the Windows command line: "C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE" /f "C:\long path\with spaces\and accented letters\like in the words\declaração de autorização.docx" /mSave_As_Txt The same command FAILS when called from inside Ada with any of the know "solutions" on GNAT gem [1] and Rosetta Code [2]. But there must be a way! Share your good code. Thanks. [1] https://www.adacore.com/gems/gem-54 [2] https://rosettacode.org/wiki/Execute_a_system_command#Ada