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.5 required=3.0 tests=BAYES_05,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.6 X-Received: by 2002:ad4:57d2:: with SMTP id y18mr13796050qvx.48.1639034804969; Wed, 08 Dec 2021 23:26:44 -0800 (PST) X-Received: by 2002:a25:a007:: with SMTP id x7mr4180658ybh.646.1639034804733; Wed, 08 Dec 2021 23:26:44 -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 23:26:44 -0800 (PST) In-Reply-To: <71f3752c-40a2-4678-9451-1223a776b384n@googlegroups.com> Injection-Info: google-groups.googlegroups.com; posting-host=46.147.104.61; posting-account=niG3UgoAAAD7iQ3takWjEn_gw6D9X3ww NNTP-Posting-Host: 46.147.104.61 References: <71f3752c-40a2-4678-9451-1223a776b384n@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <313a7e4b-b98b-405e-957b-af65c822abd5n@googlegroups.com> Subject: Re: How to call a Windows executable from Ada? From: Vadim Godunko Injection-Date: Thu, 09 Dec 2021 07:26:44 +0000 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Xref: reader02.eternal-september.org comp.lang.ada:63208 List-Id: On Thursday, December 9, 2021 at 2:04:40 AM UTC+3, amado...@gmail.com wrote= : > Any *effectively working* solution for calling an external Windows execut= able, with arguments, from inside Ada?=20 >=20 > For example, the following command runs fine when given on the Windows co= mmand line:=20 >=20 > "C:\Program Files\Microsoft Office\root\Office16\WINWORD.EXE" /f "C:\long= path\with spaces\and accented letters\like in the words\declara=C3=A7=C3= =A3o de autoriza=C3=A7=C3=A3o.docx" /mSave_As_Txt=20 >=20 > The same command FAILS when called from inside Ada with any of the know "= solutions" on GNAT gem [1] and Rosetta Code [2].=20 >=20 > But there must be a way!=20 >=20 > Share your good code.=20 >=20 See https://github.com/AdaCore/spawn