• CW 6.3 - Force program to request to "Run as Administrator"

    From IT Architect@21:1/5 to All on Mon Apr 27 10:32:01 2020
    I have a situation where I have to do a RUN of an OS process that requires it to "Run as Administrator" for it to run right. I would like to spawn the program at that level when I RUN it from within CW.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Sean H@21:1/5 to IT Architect on Tue Apr 28 10:01:11 2020
    On 28/4/20 3:32 am, IT Architect wrote:
    I have a situation where I have to do a RUN of an OS process that requires it to "Run as Administrator" for it to run right. I would like to spawn the program at that level when I RUN it from within CW.


    You might have to set the properties of the exe you call to get it to do
    that.

    Try also asking at clarionhub.com

    Sean H

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From IT Architect@21:1/5 to All on Tue Apr 28 06:39:17 2020
    That can work for me in this instance. I can use that method and then the external process I spawn will be at that level.

    The trick is the request for elevation must happen during the spawning of a process but I don't see a way to do that from within CW. Once it's spawned, you can reduce but not elevate.

    Thanks!
    PS: Thanks for the ClarionHub tip. I haven't used CW in a while.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From IT Architect@21:1/5 to All on Tue Apr 28 06:46:44 2020
    PS: This doesn't look anything like the newgroup comp.lang.clarion. They look totally independent.

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Attryde@21:1/5 to IT Architect on Tue Apr 28 10:29:03 2020
    On 2020-04-27 13:32, IT Architect wrote:
    I have a situation where I have to do a RUN of an OS process that requires it to "Run as Administrator" for it to run right. I would like to spawn the program at that level when I RUN it from within CW.


    Don't use RUN(), use the ShellExecuteEx API call

    https://stackoverflow.com/questions/4893262/how-can-i-run-a-child-process-that-requires-elevation-and-wait


    hth,
    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Paul Attryde@21:1/5 to IT Architect on Tue Apr 28 10:25:34 2020
    On 2020-04-28 09:46, IT Architect wrote:
    PS: This doesn't look anything like the newgroup comp.lang.clarion. They look totally independent.


    Correct, they are.

    Paul

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)