On 12/6/22 03:13, ToddAndMargo via perl6-users wrote:
> On 12/6/22 02:40, Ralph Mellor wrote:
>> Please confirm that:
>>
>> * Entering `ls` at the command line prompt does what it says
>> on the tin, it does not open notepad.
>>
>> * A Raku program that consists of the single line `qqx 'ls'` does
>> what it says on the tin, and does not open notepad.
>>
>> If those are true, then this code:
>>
>> ```
>> use lib '.'; use NativeWinUtils :RunCmd; say RunCmd(Q[ls]);
>> ```
>> is NOT running the code you showed starting `sub RunCmd`.
>>
>> --
>> raiph
> >raku -e "use lib '.'; use NativeWinUtils :RunCmd; say RunCmd(Q[echo
> 12345]);"
>
> >raku -e "use lib '.'; use NativeWinUtils :RunCmd; say RunCmd(Q[where
> raku]);"
>
> >raku -e "use lib '.'; use NativeWinUtils :RunCmd; say RunCmd(Q[raku
> -v], True);"
>
> Anything opens notepad with the source code to
> NativeWinUtils.pm6.
>
> What in the world did I do???
I think you missed the part about the bat
file working fine.
This is the bat file created by Q[ls]
type "K:\Windows\NtUtil\NativeWinUtils.pm6 (NativeWinUtils).bat"
ls
and when run from teh command line
"K:\Windows\NtUtil\NativeWinUtils.pm6 (NativeWinUtils).bat"
K:\Windows\NtUtil>ls
K:\Windows\NtUtil>echo dir
dir
K:\Windows\NtUtil>dir
Volume in drive K is Fedora, 4.16.5
Volume Serial Number is 67EC-FE92
Directory of K:\Windows\NtUtil
12/06/2022 03:27 AM <DIR> .
11/15/2022 09:35 AM <DIR> ..
08/25/2016 12:38 PM <DIR> Aervoe
08/25/2016 12:38 PM <DIR> AIT
12/14/2018 11:18 AM <DIR> Alpen.Sierra.Roasting
08/19/2017 06:11 PM <DIR> Alpine.Fastener.Hardware
12/31/2006 02:27 PM 2,863 Backup-ExtHD.bat
03/11/2007 07:02 PM 3,311 Backup-ExtHD2.bat
This is obviously not a raku issue, but a Windows issue.