RUNSHELL AND ADMINISTRATORS
Posted: Wed Jul 10, 2024 7:39 am
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() 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