Discussion:
Is there a shell function?
(too old to reply)
T
2020-02-27 04:14:12 UTC
Permalink
Hi All,

Widows 7

I am tring to code the following into Raku, but
and stuck in quote hell

fsutil usn readdata "C:/NtUtil/test 1"

Is there one of those fancy system call that will run
the above for me?

Many thanks,
-T
R.Wieser
2020-02-27 08:19:50 UTC
Permalink
T,
Post by T
Is there one of those fancy system call that will run
the above for me?
You mean like "CreateProcess" in kernel32.dll ?

https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa

No, can't think of any. :-)

Regards,
Rudy Wieser
T
2020-02-27 09:18:48 UTC
Permalink
Post by R.Wieser
T,
Post by T
Is there one of those fancy system call that will run
the above for me?
You mean like "CreateProcess" in kernel32.dll ?
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa
No, can't think of any. :-)
Regards,
Rudy Wieser
Rats!
JJ
2020-02-27 10:02:35 UTC
Permalink
Post by R.Wieser
T,
Post by T
Is there one of those fancy system call that will run
the above for me?
You mean like "CreateProcess" in kernel32.dll ?
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa
No, can't think of any. :-)
Regards,
Rudy Wieser
Rats!
If it's complicated for you to use, try `ShellExecute()` or the old
`WinExec()`.
T
2020-02-29 02:38:55 UTC
Permalink
Post by JJ
Post by R.Wieser
T,
Post by T
Is there one of those fancy system call that will run
the above for me?
You mean like "CreateProcess" in kernel32.dll ?
https://docs.microsoft.com/en-us/windows/win32/api/processthreadsapi/nf-processthreadsapi-createprocessa
No, can't think of any. :-)
Regards,
Rudy Wieser
Rats!
If it's complicated for you to use, try `ShellExecute()` or the old
`WinExec()`.
Bugs that stopped me:

qqx, shell not operating quotes properly
https://github.com/rakudo/rakudo/issues/3518

How should Proc::Async.new, run and shell call cmd.exe?
https://github.com/Raku/problem-solving/issues/20

I work around them by writing out the commands to a
batch file and then executing the batch file

Bonita Montero
2020-02-27 10:22:00 UTC
Permalink
Post by T
Hi All,
Widows 7
I am tring to code the following into Raku, but
and stuck in quote hell
fsutil usn readdata "C:/NtUtil/test 1"
Is there one of those fancy system call that will run
the above for me?
Does this help:
https://perldoc.perl.org/functions/system.html
T
2020-02-29 02:36:45 UTC
Permalink
Post by Bonita Montero
Post by T
Hi All,
Widows 7
I am tring to code the following into Raku, but
and stuck in quote hell
fsutil usn readdata "C:/NtUtil/test 1"
Is there one of those fancy system call that will run
the above for me?
https://perldoc.perl.org/functions/system.html
Turns out there is a bug in Raku when calling cmd and
friends when a parameter has a space in it.

I workaround it by writing the command out to a batch
file and then executing the batch file.
Loading...