Discussion:
CW 6.3 - Force program to request to "Run as Administrator"
(too old to reply)
IT Architect
2020-04-27 17:32:01 UTC
Permalink
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.
Sean H
2020-04-28 00:01:11 UTC
Permalink
Post by IT Architect
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
IT Architect
2020-04-28 13:39:17 UTC
Permalink
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.
IT Architect
2020-04-28 13:46:44 UTC
Permalink
PS: This doesn't look anything like the newgroup comp.lang.clarion. They look totally independent.
Paul Attryde
2020-04-28 14:25:34 UTC
Permalink
Post by IT Architect
PS: This doesn't look anything like the newgroup comp.lang.clarion. They look totally independent.
Correct, they are.

Paul
Paul Attryde
2020-04-28 14:29:03 UTC
Permalink
Post by IT Architect
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

Loading...