Preventing RunProgram() Authorisation Screen

Just starting out? Need help? Post your questions and find answers here.
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Preventing RunProgram() Authorisation Screen

Post 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?
User avatar
kpeters58
Enthusiast
Enthusiast
Posts: 341
Joined: Tue Nov 22, 2011 5:11 pm
Location: Kelowna, BC, Canada

Re: Preventing RunProgram() Authorisation Screen

Post by kpeters58 »

https://www.raymond.cc/blog/task-schedu ... ac-prompt/

Look at 4. Task Scheduler Trick - would that work for you?
PB 5.73 on Windows 10 & OS X High Sierra
RichardL
Enthusiast
Enthusiast
Posts: 532
Joined: Sat Sep 11, 2004 11:54 am
Location: UK

Re: Preventing RunProgram() Authorisation Screen

Post 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
Smetad_Anarkist
New User
New User
Posts: 8
Joined: Wed Jul 19, 2017 5:50 am

Re: Preventing RunProgram() Authorisation Screen

Post 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.
Post Reply