Xbase++
RUNSHELL() COMMAND AND ADMINISTRATOR AUTHORIZATIONS
Notes:
The RunShell() command is becoming more and more relevant for working
with the program CURL.EXE (which is now an integral part of windows)
and other similar tools for the development and use of electronic XML
and JSON documents via HTTP and RESTFUL WEB SERVICES (electronic
invoices and fiscal accounts and the like)
---------------------------------------------------------------------------
Part 1
If the external program SHARED.EXE (Autoit) or SHARED.EXE (Xbase++)
requires administrator rights to start
so that program is started from the Xbase++ application TEST.EXE with
RunShell("","SHARED.EXE")
SHARED.EXE will not start because it requires administrator rights
and the Xbase++ application TEST.EXE will report an error and terminate.
The program SHARED.EXE will start only in the case when TEST.EXE
starts as administrator
If the TEST.EXE command is used in the Xbase++ application
RunShell("/C SHARED.EXE",,.F.,.T.)
The SHARED.EXE program will also start if the TEST.EXE application
not started as administrator
---------------------------------------------------------------------------
Part 2
If the Xbase++ application TEST.EXE is located in the C:\PRG folder
and works on the database workspace:
SET PATH "C:\PRG\DATA"
CURDIR("C:\PRG\DATA")
then the SHARED.EXE program must be located in the C:\PRG folder
and must be started as follows:
curdir("C\PRG")
RunShell("/C SHARED.EXE",,.F.,.T.)
curdir("C:\PRG\DATA")
---------------------------------------------------------------------------
Part 3
The SHARED.EXE program can also be started from the Xbase++ application
via command lines: SHARED.CMD
curdir("C\PRG")
RunShell("/C SHARED.CMD",,.F.,.T.)
curdir("C:\PRG\DATA")
The SHARED.CMD file has only one line that reads: SHARED.EXE
The files TEST.EXE, SHARED.EXE and SHARED.CMD must be present
in the same folder - in this example in the C:\PRG folder
RUNSHELL AND ADMINISTRATORS
- slobodan1949
- Posts: 82
- Joined: Mon Apr 25, 2011 8:57 am
- Location: SERBIA
- Contact:
Re: RUNSHELL AND ADMINISTRATORS
We only use CURL for testing with RestFul APIs. We use the Chilkat Library in our applications, and the Chilkat Online Tools to get FoxPro code directly from Postman collections and Swagger APIs (which is easy to convert to Xbase++). Using the Chilkat functionalities gives the control about the process and it's results which is needed for most of the services used with REST. I personally wouldn't deliver anything that depends on programs spawned by RunShell().
Best regards,
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Tom
"Did I offend you?"
"No."
"Okay, give me a second chance."
Re: RUNSHELL AND ADMINISTRATORS
I wouldn't do so either.I personally wouldn't deliver anything that depends on programs spawned by RunShell().
I use httpClient for REST services.
The eXpress train is coming - and it has more cars.