Jump to content

Handling UAC issues.


zone97
 Share

Recommended Posts

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?

 

Spoiler

WinSizer 2.1 (01/04/2017) - Download - [ Windows Layout Manager ]
Folder+Program (12/23/2016) - Download - [ USB Shortcut Creator ]

 

Link to comment
Share on other sites

  • Moderators

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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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!

 

Spoiler

WinSizer 2.1 (01/04/2017) - Download - [ Windows Layout Manager ]
Folder+Program (12/23/2016) - Download - [ USB Shortcut Creator ]

 

Link to comment
Share on other sites

  • Moderators

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
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?

 

 

Spoiler

WinSizer 2.1 (01/04/2017) - Download - [ Windows Layout Manager ]
Folder+Program (12/23/2016) - Download - [ USB Shortcut Creator ]

 

Link to comment
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?

Signature - my forum contributions:

Spoiler

UDF:

LFN - support for long file names (over 260 characters)

InputImpose - impose valid characters in an input control

TimeConvert - convert UTC to/from local time and/or reformat the string representation

AMF - accept multiple files from Windows Explorer context menu

DateDuration -  literal description of the difference between given dates

Apps:

Touch - set the "modified" timestamp of a file to current time

Show For Files - tray menu to show/hide files extensions, hidden & system files, and selection checkboxes

SPDiff - Single-Pane Text Diff

 

Link to comment
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.

 

Spoiler

WinSizer 2.1 (01/04/2017) - Download - [ Windows Layout Manager ]
Folder+Program (12/23/2016) - Download - [ USB Shortcut Creator ]

 

Link to comment
Share on other sites

  • Moderators

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.

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

  • 3 weeks later...
  • Moderators

@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

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to comment
Share on other sites

  • 4 months later...

Teamviewer handles uac nicely. Are you married to your remote pc software? If not, give it a go.

Edi5:

Remote Utilities will also let you remotely execute commands as admin. 

 

Damn I just notice this post is over 4 months old. My apologies. 

Edited by BetaLeaf

 

 

Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...