Page 1 of 1

Preventing RunProgram() Authorisation Screen

Posted: Tue Jul 18, 2017 9:16 am
by RichardL
Good morning,

My main program selects one of a number of executable (.exe) interface modules depending on the instruments connected to the PC via USB or serial ports.
It then uses RunProgram() to launch the module and the module and main program then proceed to exchange imported data via an area of shared memory.
All works well, and has done for some time.
I'm now proposing to give the complete package to colleagues and would like to suppress the alarming system generated full screen query that appears when the module is launched "Do you want this app from an unknown supplier to make changes to your device".

Any ideas, please?

Re: Preventing RunProgram() Authorisation Screen

Posted: Tue Jul 18, 2017 3:59 pm
by kpeters58
https://www.raymond.cc/blog/task-schedu ... ac-prompt/

Look at 4. Task Scheduler Trick - would that work for you?

Re: Preventing RunProgram() Authorisation Screen

Posted: Tue Jul 18, 2017 9:10 pm
by RichardL
@kpeters58
Thanks for the suggestion. The problem is that each end user would need to carry out the same procedure and I'm fairly sure that 90% of them would not be able to carry it out!
I need a solution that can be incorporated into the main EXE. Something like:

Turn off the protection / monitor
Load and run the selected program module
Turn on the protection/ monitor

If this can be made to work it does not require any changes or modification to the computer's configuration.

RichardL

Re: Preventing RunProgram() Authorisation Screen

Posted: Wed Jul 19, 2017 1:31 pm
by Smetad_Anarkist
What you are seeing is probably the UAC-prompt in Windows. And to disable it requires changes to registry and a reboot according to an answer on stack overflow.

There are other suggestions in that stack overflow thread, such as making sure the first exe runs with elevated privileges, that way only one prompt will be shown and so. Also you probably want to sign your exe. That way the prompt will be a bit nicer looking and over all it gives a more professional appearance from your part towards your clients.