Alaska Software Inc. - Re: Runshell cannot run a program that requires elevation.
Username: Password:
AuthorTopic: Re: Runshell cannot run a program that requires elevation.
Andreas Gehrs-Pahl

View the complete thread for this message in:

Re: Runshell cannot run a program that requires elevation.
on Thu, 22 Oct 2015 01:44:02 -0400
Itai,

>Try to activate the User-Account-Control and invoke executable from within 
>RunShell (e.g. RunShell( "", “Test.exe”, .T. ) ).
>It does not work on my Win-7.

As I said, this works fine for me. If I allow the rights elevation, the 
other application is started, while the first one continues to work just 
fine. If I refuse the rights elevation, the other application is not 
started, and an OS Runtime Error is raised: 1223 -- "The Operation was 
canceled by the user", which can be Ignored, after which the original 
application continues to run without any issues.

But, if you don't need asynchronous behavior, as indicated above, you could 
try using the ShellExecuteA() API function instead, and see if this works 
better for you.

Can you post some actual code that produces the error? What error is raised? 
What Xbase++ version do you use? Have you tried without UAC? Have you tried 
to start a different application (that requires rights elevation)? Have you 
tried it on a different computer?

The problem is probably not RunShell(), but something else you are doing.

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas.GP@Charter.net
web:   http://www.Aerospace-History.net