Sign in to follow this  
Followers 0
zone97

Handling UAC issues.

12 posts in this topic

I have a project in mind, but have run into a roadblock. I have created an app, that when run checks for a files existence, if not found, downloads, once downloaded lets you select some

settings, then launch the file downloaded. What I wanted to happen was it to answer all the "next" buttons and "fill in the blanks" check radio buttons.. Etc..  Then complete the install.

Problem is, the downloaded program triggers UAC, and then my app no longer has the ability to click anything.. And yes, I know I can do a run as admin on my script.. Don't want to...

also don't want to have to lower the UAC to do this.. The only work around I have come up with is to run my app, fill in everything, save to an INI, self terminate, relaunch, as a self run as

admin, read the ini file, then launch the downloaded program do all the work.  Basically I want to automate the install of a program so that it can be done remotely and the client doesn't

have to do anything other than answer "yes" I want to allow changes.

 

Any other way to get this done?

Share this post


Link to post
Share on other sites



Think about what you're asking:

25 minutes ago, zone97 said:

yes, I know I can do a run as admin on my script.. Don't want to...

Quote

also don't want to have to lower the UAC to do this..

In essence, you're wanting to bypass a security measure built into the Operating System...


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

Let me explain the situation. I do remote support for hundreds of clients. I have to remote into their pc to install a particular program over and over and over and over. 9 times out of 10, the uac kicks in and I have to verbally explain to the person what to click, what to fill in what to push. All well and good but if the person doesn't speak good English, then it becomes a challenge to explain what I want done.  So, what I am trying to automate is the conversation. I want to click a button, download, launch, fill out, complete and walk away.. So not trying to bypass as much as work around to make life easier.

 

 

Edited by zone97
Explanation!

Share this post


Link to post
Share on other sites

I understand your situation; I work with a large number of customers remotely, and UAC can be a hassle. But, while your intent is certainly not bad, the point I am making is that if someone provides you with code to completely bypass the UAC, your legitimate reason doesn't keep someone with lesser morals from coming along and using the code for another purpose. We're more than happy to assist with properly managing the UAC (using RunAs, etc.), but we cannot support discussion on bypassing it.


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

I understand, and do not want to disable or bypass. The user will still need to answer the question "Do you want to allow this application to make changes" I just want to automate everything past that point.. Like this..

I run my app, answer all the questions fill in the blanks etc.. Hit install.. It would then write an INI file, launch itself as a RUNAS, then terminate the first instance. The new instance would trigger the uac that the client would answer. It would then read the INI, launch the downloaded program and then automate the install. When done, it would self terminate and clean up. ??? Is that against the rules?

 

Share this post


Link to post
Share on other sites

@zone97,

the solution is to put @RequireAdmin at the top of your script.

if this is what you refer to when you say:

On 11/1/2016 at 8:27 PM, zone97 said:

I know I can do a run as admin on my script.. Don't want to...

then, do you have any valid reason for the "Don't want to..." part?

Share this post


Link to post
Share on other sites

Yes, the whole point of this process is to automate the installation of an application remotely. When the install starts it prompts "Do you wish to allow this program to make changes to windows?" At this point I as the remote support loose control, I won't be able to use the mouse and keyboard and then have to tell the client, Click here, click there, fill this in, push this button.. " Its tedious because half the time, they don't understand. So, This app automates the process so the client just has to sit there and watch.

Share this post


Link to post
Share on other sites

What you're asking is a way to automate or bypass the UAC prompt, so you don't have to walk the user through doing it, and we are not going to support that.


When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

Fair enough, but subject is now moot as it has already been accomplished.

Share this post


Link to post
Share on other sites

#10 ·  Posted

There is a way for you to sorta do it if the file you are downloading will still work with normal integrity.

You can try to edit the manifest of the file in the resource to set the execution level to asInvoker instead of RequireAdministrator and that will remove the prompt.

Share this post


Link to post
Share on other sites

#11 ·  Posted (edited)

<snip>

Edited by JLogan3o13

Share this post


Link to post
Share on other sites

#12 ·  Posted (edited)

@Wolfe33 how about some common sense next time? Posting a link describing the flaws in UAC and how these can be exploited is not something we're going to support on this forum.

Edit: I see that this is the second Mod intervention for you in three whole posts. Future posts from you will be reviewed before being visible until you begin to evidence some thought before typing.

Edited by JLogan3o13

When you're dead, you don't know you're dead - it's only difficult for those that know you. It's the same way when you're stupid...

My Scripts: SCCM UDFInclude Source with Compiled Script, Windows Firewall UDF

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0