need to run powershell script from within rebol cgi script

61 views
Skip to first unread message

Hasan BaAqeil

unread,
Jul 2, 2017, 1:20:08 PM7/2/17
to REBOL
is there a way to run powershell script by calling the script from within rebol cgi script?

pd

unread,
Jul 2, 2017, 3:10:12 PM7/2/17
to re...@googlegroups.com
standard run function doesn't work?

>> help run
USAGE:
    RUN file /as suffix

DESCRIPTION:
     Runs the system application associated with a file.
     RUN is a native value.

ARGUMENTS:
     file -- The file to open (file, URL) or command to run (string). (Type: file url string)

REFINEMENTS:
     /as
         suffix -- (Type: string file)

On Sun, Jul 2, 2017 at 5:01 PM, Hasan BaAqeil <hbaa...@gmail.com> wrote:
is there a way to run powershell script by calling the script from within rebol cgi script?

--
You received this message because you are subscribed to the Google Groups "REBOL" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rebol+unsubscribe@googlegroups.com.
To post to this group, send email to re...@googlegroups.com.
Visit this group at https://groups.google.com/group/rebol.
For more options, visit https://groups.google.com/d/optout.



--
Andrés

~ La mejor manera de librarse de la tentación es caer en ella. ~ Oscar Wilde ~

Peter W A Wood

unread,
Jul 2, 2017, 8:54:58 PM7/2/17
to re...@googlegroups.com
Hasan

> On 2 Jul 2017, at 23:01, Hasan BaAqeil <hbaa...@gmail.com> wrote:
>
> is there a way to run powershell script by calling the script from within rebol cgi script?
>

You use the call function to run an external program. For example:

>> response: make string! 100
== ""
>> call/output/show "powershell date" response
== 0
>> response
== {
03 July 2017 08:51:39


}

There are one or two issues with the call function in Rebol 2.7.8 under Windows. I believe it is necessary to use the /show refinement, without Rebol seems to hang.

I hope this helps.

Peter

Hasan BaAqeil

unread,
Jul 2, 2017, 10:57:34 PM7/2/17
to REBOL
it works like a charm.. run/output/show

many thanks all
appreciate your time..
Reply all
Reply to author
Forward
0 new messages