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.0 required=3.0 tests=BAYES_40,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:a05:6214:301b:: with SMTP id ke27mr11128013qvb.68.1639004678787; Wed, 08 Dec 2021 15:04:38 -0800 (PST) X-Received: by 2002:a5b:c81:: with SMTP id i1mr1997326ybq.115.1639004678656; Wed, 08 Dec 2021 15:04:38 -0800 (PST) Path: eternal-september.org!reader02.eternal-september.org!news.misty.com!border2.nntp.dca1.giganews.com!nntp.giganews.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Wed, 8 Dec 2021 15:04:38 -0800 (PST) Injection-Info: google-groups.googlegroups.com; posting-host=94.60.27.164; posting-account=3cDqWgoAAAAZXc8D3pDqwa77IryJ2nnY NNTP-Posting-Host: 94.60.27.164 User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <71f3752c-40a2-4678-9451-1223a776b384n@googlegroups.com> Subject: How to call a Windows executable from Ada? From: Marius Amado-Alves Injection-Date: Wed, 08 Dec 2021 23:04:38 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:63206 List-Id: Any *effectively working* solution for calling an external Windows executab= le, with arguments, from inside Ada? For example, the following command runs fine when given on the Windows comm= and line: "C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE" /f "C:\long p= ath\with spaces\and accented letters\like in the words\declara=C3=A7=C3=A3o= de autoriza=C3=A7=C3=A3o.docx" /mSave_As_Txt The same command FAILS when called from inside Ada with any of the know "so= lutions" 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