PxPlus User Forum

Main Board => Discussions => Language => Topic started by: ChrisKCAi on July 22, 2020, 02:08:05 PM

Title: INVOKE/SYS() rights on Windows
Post by: ChrisKCAi on July 22, 2020, 02:08:05 PM
Consider:
1.   I am logged on to a Windows server (via RDP) with an account that has admin rights.
2.   UAC is turned off.
3.   I run PxPlus (inside my RDP session) and use either INVOKE or the SYS function.
4.   Is the resultant operating system command run with my elevated/admin rights?
Anecdotal evidence would seem to indicate "yes" but I'm looking for a more definitive answer.
Title: Re: INVOKE/SYS() rights on Windows
Post by: Mike King on July 22, 2020, 04:41:19 PM
Technically the INVOKE command will be run using the same userid as you logged on with and with the same rights.

This is much like if you run the Windows command mode from an admin userid.  To get full administrative rights you have to right click the shortcut and select 'Run as Administrator'.  Now if you started PxPlus with a "Run as Administrator" then anything you spawn will also be running as administrator.

If you want to be sure you are launching a system command in administrator mode try:

INVOKE CONTROL "command"

If PxPlus is not already running in Administrator mode the system will ask before running command.  If it is running in administrator mode, the command will simply be executed.
Title: Re: INVOKE/SYS() rights on Windows
Post by: ChrisKCAi on July 24, 2020, 12:07:07 PM
Does the SYS function have an equivalent to CONTROL? (doesn't appear to)
Title: Re: INVOKE/SYS() rights on Windows
Post by: Mike King on July 24, 2020, 02:13:40 PM
No -- only the INVOKE provides for a CONTROL option.