powershell
john at timescape.com
john at timescape.com
Fri Sep 30 12:11:30 PDT 2022
Yes, a powershell script can be run using the SYSTEM command. Jason Garner
wrote me a great PS script that would take passed parameters from my
processing table and run them within the PS script. I pass the info for a
complete mail message (To:, From:, Subject:, Body:, etc.) and his script
sends it to an smpt server. It works great...
Passing the parameters from filePro takes a considerable amount of time to
do correctly. As always, the syntax is very, if not extremely picky! You
must get the apostrophes, quotes, parentheses and all that exactly right or
you will go crazy for a long while. Eventually, I made a one field filePro
file with the field being about 500 characters long. Then I ckept
generating the SYSTEM command into a free record in this file, so I could
look at *exactly* what filePro would be handing to Powershell. You need to
look up some parameters for PS itself like -executionpolicy and bypass, some
others that will make is so powershell will actually run the script you are
intending to run.
It certainly does work, but the first one you do... well it will take some
frustrating testing to pass exactly what is required.
JJE
P.S. Incidentally, I actually run the whole Powershell script thing from a
SYSTEM command running on SCO OS5, and more recently CENTOS7. Since people
are logged in through a terminal emulator to the *nix server, I must use a
terminal ESCAPE to send the actual full SYSTEM command to the Windows
environment running the terminal emulator. Probably not a lot of call for
this, but in case anyone wants to get Windows to do lots of things from
within a filePro .prc table, it's as easy as ever with Powershell.... which
by the way is a fantastic hybrid of mostly pure UNIX and very little Windows
Batch scripting. You will feel like you are writing a *nix shell script!
Good luck.
-----Original Message-----
From: Filepro-list
<filepro-list-bounces+john=timescape.com at lists.celestial.com> On Behalf Of
JohnMac via Filepro-list
Sent: Friday, September 30, 2022 6:14 AM
To: filepro-list at lists.celestial.com
Subject: powershell
Have a script that needs to run from powershell
Is there a way to use the system command or other process to access and run
it from powershell?
John McNaughton
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://mailman.celestial.com/pipermail/filepro-list/attachments/20220930/34
c1cb48/attachment.html>
_______________________________________________
Filepro-list mailing list
Filepro-list at lists.celestial.com
Subscribe/Unsubscribe/Subscription Changes
http://mailman.celestial.com/mailman/listinfo/filepro-list
More information about the Filepro-list
mailing list