Page 1 of 1

Push2Run emmiting errors when executing through task scheduler

Posted: Thu Apr 08, 2021 10:08 pm
by Felpold
Hi, Firstly I want to say, I'm in love with this piece of software, it allows me to do SO MUCH and so easily.

Now, for the problem I'm running into, I want Push2run to run with admin privileges, so that it can run smoother, and faster.
But, usually, for it to run with privileges, I have to click the "OK" on the UAC prompt it gerates, and, that is such an annoyance.....
My PC is REAALY slow starting up (it has my previous laptops HD'S) so I automated my problem, I ask google to WOL my PC, and it logs in autommatically on my account, and, then I can just keep doing my stuff while the PC awakens.

THE PROBLEM IS, the annoying UAC prompt usually vanishes when I actually sit on my desk to start my day, and then I have to start P2R myself.

So, (I thought) I solved my problem by using the Windows task scheduler to create a task, it runs on logon, and starts both P2R and P2R Reloader with the highest privileges.

The error I'm encontering is :
https://imgur.com/a/3tc8dxe


There is a section in portuguese (on the error message) translated as such :

O sistema não pode encontrar o arquivo especificado === The system couldn't find the specified file

If anyone can help me (Our Lord and Savior : Rob Latour (specifically)) I would aprecciate immenselly

Re: Push2Run emmiting errors when executing through task scheduler

Posted: Fri Apr 09, 2021 1:26 am
by RobLatour
To be clear, "Our Lord and Savior" is my boss, I just try to be a faithful servant.

Thanks however for the kind words about the program, I'm glad its of help to you.

I'll have to look into what you are asking, I'm not sure there is an easy workaround - MS really does like you to click that UAC button, I think it's their equivalent to Google being hung up on "OK Google" or "Hey Google" as their trigger words:-)

Having that said, in the past, I believe I did figure out a way to do this (start a program without the extra UAC prompt) by clicking on an icon linked to a .bat file starting up a power shell script which it turn ran the program - it was kind of convoluted, but in short:

I create a temp directory on my c: drive and had two files in it:

one was a .bat file that, translated to this problem, looked like this:

c:
cd temp
%SystemRoot%\system32\WindowsPowerShell\v1.0\powershell.exe -ExecutionPolicy ByPass -File "xx.ps1"

the other was the xx.ps1 file that looked like the one found here:
https://stackoverflow.com/questions/425 ... rt-process
but with the program I wanted run being identified in the last line.

I just tried it now, but my virus software (Bitdefender) sprang up an objection.

In any case, Push2Run also has some special coding in it for starting the program with and without admin privileges to facilitate the functionality in the program that allows you to evaluate it on demand from within the program itself. Not sure if that will in the end add or subtract from the problem at hand. But if I have some time I'll take a look.

However, if I do and a black van comes to my door, you may not be hearing from me again. If that happens, please let my family know I loved them :-)

Re: Push2Run emmiting errors when executing through task scheduler

Posted: Fri Apr 09, 2021 7:18 am
by Felpold
I'll try what you reccommended, and I hopefully works well

(Update : I tried, It worked out perfectly, thanks !)

Re: Push2Run emmiting errors when executing through task scheduler

Posted: Fri Apr 09, 2021 9:10 am
by RobLatour
Perfect, glad it worked for you, thanks for the update.

Re: Push2Run emmiting errors when executing through task scheduler

Posted: Sat Apr 10, 2021 11:55 am
by RobLatour
*** Important Update ***

So today I found that if I right-clicked on my desktop, and selected either 'Display settings' or 'Personalize' I got a pop-up message saying:
ms-settings:display

This file does not have an app associated with it for performing this action. Please install an app or, if one is already installed, create an association in the Default Apps Settings page.

Having that said, I could still change my personalized settings and display by going directly into the Windows Setting command.

Regardless, annoying for sure. However, after a bit of digging, I found that it had been caused by the suggested change above.

Thankfully, this video outlines the solution: https://www.youtube.com/watch?v=J2s94LucSU0

in short, using regedit - remove the subkeys under HKEY_CURRENT_USER\SOFTWARE\Classes\ms-settings, and update/add keys as follows (export from: HKEY_CURRENT_USER\SOFTWARE\Classes\ms-settings ).

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\SOFTWARE\Classes\ms-settings]
@="URL:ms-settings"
"URL Protocol"=""


and reboot.

Now, while the above fixes the problem with the unwanted pop-up display, the change also makes it so you can't start push2run with admin rights without clicking on the UAC prompt (which was the point of the thread above). As this latter is something I myself don't want to do anyway, I'm just going to go with the fixed solution to the pop-up problem.

You may need to decide which problem you want to be solved the most: a) running push2run without a uac prompt, or b) being able to change your desktop / personalize settings via a right-click on your desktop.

Hope this helps