-
Jun 26th, 2018, 08:32 AM
#1
Thread Starter
Lively Member
[RESOLVED] Windows UAC stops code execution ?
Had this problem come up when making a client/server app (using tcp and sockets).
The server sends data to the client every 15 secs.
When the UAC prompt shows up on the client side it stops receiving data until you either
accepted or canceled the said prompt.
I could go around UAC but I'm looking for a clean solution if there is one.
Thanks,
KBConsole
-
Jun 26th, 2018, 03:03 PM
#2
Re: Windows UAC stops code execution ?
You know how to bypass UAC which no programmer would do unless up to no good but can't find a solution? Considering if we think on the innocent side you have not provided us with any code or an explanation what you are doing.
The clean solution is to obtain admin rights.
-
Jun 26th, 2018, 08:21 PM
#3
Thread Starter
Lively Member
Re: Windows UAC stops code execution ?
I have admin rights but still get the "yes/no" prompt, which interrupts the program.
Said program being a remote mouse, in a way.
It's actually checking for the darkest area on the client screen and moves the mouse towards it.
Used for testing dark spots on screens since it looks at a white image.
Using the windows API to move the mouse and 2 timers I figured the mouse API may be the part that is blocked by the prompt ?
PS: I could bypass it and since we are in a testing environment I wouldn't risk much but it's not something I'd like to do.
Last edited by KBConsole; Jun 26th, 2018 at 08:24 PM.
-
Jun 27th, 2018, 10:11 AM
#4
Re: Windows UAC stops code execution ?
When you run your program, do "Run as Admin"? If not, try that.
-
Jun 27th, 2018, 03:14 PM
#5
Re: Windows UAC stops code execution ?
Being admin is not the same as XP. Application rights are bassed on tokens. Change the applications manifest to requireAdministrator.
https://msdn.microsoft.com/en-us/library/bb384691.aspx
-
Jun 28th, 2018, 09:19 AM
#6
Thread Starter
Lively Member
Re: Windows UAC stops code execution ?
I had already tried that but it doesn't change anything.
I believe the "uiAccess" setting would fix my problem if set to true but I have no certificate.
It requires a MS certified app to use that setting.
I fixed it by editing the reg key for auto-accepting prompts from admin accounts on form load and change it back on exit.
A better option might exist but this fits nicely for the job so it'll do for now.
Thanks for the help,
KBConsole
-
Jun 29th, 2018, 07:17 AM
#7
Re: [RESOLVED] Windows UAC stops code execution ?
because that doesn't seem nefarious at all...
you don't need a cert to set level=requireAdministrator
This puts the UAC prompt at the start of the app, and voila - no interruption.
-
Jun 29th, 2018, 02:02 PM
#8
Thread Starter
Lively Member
Re: [RESOLVED] Windows UAC stops code execution ?
Originally Posted by DEXWERX
because that doesn't seem nefarious at all...
you don't need a cert to set level=requireAdministrator
This puts the UAC prompt at the start of the app, and voila - no interruption.
I'll admit this may look suspicious but it's pretty much supposed to (due to the job it does), here's why:
The place I currently work at refurbishes laptops.
This involves a lot of testing which we have many different programs for. (Some not being made by me)
The software I was working on is running all needed programs remotely (From our local server).
Some of said programs need admin rights (and even when on an admin session that give you a "yes/no" prompt).
Since this is the same structure as many malware (remote connection, data retrieval, distant program execution,etc...)
I chose not to post any code example of it since it could rather easily be tempered with and converted for improper IT usage.
This being said elevating my program wouldn't have worked.
Sincerely,
KBConsole
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|