I am admin user. I have 32 bit exe which I have scheduled it from task scheduler to run at every night. Though it is running in elevated mode. How do I force it to run in non elevated mode. I did try to uncheck "Run with highest privileges" but did not help.
Asked
Active
Viewed 396 times
1
-
Create a new user that is not admin, and schedule to run it through that user. – LPChip May 01 '20 at 07:41
-
Yes I tried it but that way exe is not running correctly(not the permission issues). In other words, if admin manually runs it (non elevated) it is working fine. I tried to use run-app-as-non-admin.bat Set ApplicationPath="C:\Program Files\SomeApp\testapp.exe" cmd /min /C "set __COMPAT_LAYER=RUNASINVOKER && start "" %ApplicationPath%" but not working either from task scheduler when I set this bat file as action – Kevin May 01 '20 at 07:58
-
Is the task doing something on a network share that the new user does not have access to? – LPChip May 01 '20 at 08:01
-
No it is all local. when I use __COMPAT_LAYER=RUNASINVOKER , I think task scheduler always in elevated mode and and hence causing exe to be run in elevated mode too.. so I am not sure this is going to work at all – Kevin May 01 '20 at 08:12
-
why are you using runasinvoker anyway? you can just set the task to run as a different user non-elevated and it will run as if you double-click the exe. No need to use all the settings you set – LPChip May 01 '20 at 08:32
-
Yes but exe is having issue when it is running under standard user. I tried to give full permission on the exe for standard user and is not working like just admin double click work.. not sure in backend what exe is trying to access.. – Kevin May 01 '20 at 09:04
-
When your exe only runs fine as admin, why don't you want to run it as admin? Probably it is useful to create a new question with details of "having issue when it is running under standard user". – Furty May 01 '20 at 10:00
-
I am using c# console application to connect to QB via SDK. I have scheduled the console application on task scheduler under admin user account. Task scheduler is running both app and QB in elevated mode. Though this seems to work when no other user is connected to server and logged into QB. When other users open QuickBooks(Multi User mode), app is having an issue and error says "Could not start QuickBooks". I did try to set UAC level to never notify but did not help..... my original question - https://stackoverflow.com/questions/61526681/qb-sdk-error-could-not-start-quickbooks – Kevin May 01 '20 at 11:05
-
So basically the issue is not with the task scheduler or your own code, but with launching multiple instances of QuickBooks at the same time? What does the QuickBooks support team say about this? – Furty May 01 '20 at 12:17
-
I asked the similar question in QuickBooks Forums too no answers. usually it is well known that QB SDK is not that stable in terms of connection but people knows workarounds and I do not. – Kevin May 01 '20 at 12:31