Hi!
Has anyone had any luck executing PowerShell from LC? I've tried three ways:
1. Setting Powershell to be the shellCommand, then using shell().
2. Using cmd.com to send "powershell xxx" commands using shell().
3. Using the open/write/read process process.
None seem able to close the PowerShell process once it is open (including "close process"), and none seem to get any response back in either "it" or "the result", except for "-?" help return. I sometimes get a partial return if I call up the Task Manager and kill the PowerShell process that way, but not if I interrupt LC with a ctrl-period.
Thanks,
Walt
PowerShell
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
PowerShell
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
Re: PowerShell
Hi Walt,
Ask in a PowerShell forum how to turn your PowerShell script into a standalone executable.
Run executable directly from shell().
Best,
Mark
Ask in a PowerShell forum how to turn your PowerShell script into a standalone executable.
Run executable directly from shell().
Best,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: PowerShell
Ah, thanks Mark. I'll try that as well. My objective though was to make a PowerShell GUI in LC for my own use. I want to capture output, maintain a library of PS scripts and utilities.
Walt
Walt
Walt Brown
Omnis traductor traditor
Omnis traductor traditor
Re: PowerShell
Walt,
PowerShell contains very many features that you can't run directly from within Revolution. That will probably make it very difficult to create a useful GUI for it.
Kind regards,
Mark
PowerShell contains very many features that you can't run directly from within Revolution. That will probably make it very difficult to create a useful GUI for it.
Kind regards,
Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode
Re: PowerShell
Hi Mark,
What I was trying to do was open it as a process (I was reading about "open process" in LC), and then either use stdin and stdout to communicate (using -NoExit and -NonInteractive switches) with it, or launch it each time I had a command. I'm still experimenting. My main goal is figuring out how to successfully use "open process", PowerShell is just the "victim"...
Walt
What I was trying to do was open it as a process (I was reading about "open process" in LC), and then either use stdin and stdout to communicate (using -NoExit and -NonInteractive switches) with it, or launch it each time I had a command. I'm still experimenting. My main goal is figuring out how to successfully use "open process", PowerShell is just the "victim"...
Walt
Walt Brown
Omnis traductor traditor
Omnis traductor traditor