[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

How to run code as "administrator" user with UAC enabled.

Posted on 2014-08-05
9
Medium Priority
?
133 Views
Last Modified: 2014-12-23
We have a terminal server running Windows 2013 R2. We need to run an application that we wrote to periodically register a .dll file as the domain administrator. The code works on a computer without UAC enabled.

Once UAC is enabled the code will no longer work. Please see the function attached.   code.gif
0
Comment
Question by:PROACTIVETG
  • 4
  • 4
8 Comments
 
LVL 99

Expert Comment

by:John Hurst
ID: 40242003
A person needs admin authority to register a DLL. That is normal and UAC should not be disabled (because of other security concerns).

How often to you need to register this DLL?  Register it once and then done?
0
 

Author Comment

by:PROACTIVETG
ID: 40242014
In the code we have the credentials of the administrator (encrypted).

We need to register the .dll files only after software upgrades of a specific accounting application. Seems the application upgrade works but misses the last part of the upgrade (registering the .dlls). Since there are so many upgrades we want users to upgrade the application but they do not have rights to register .dlls.
0
 
LVL 99

Expert Comment

by:John Hurst
ID: 40242023
What we do for our QuickBooks clients is schedule the upgrades so we can go to all the machines in one client and upgrade QB. We do that as administrator. This works fine.

I am not sure what to suggest short of reducing the number of upgrades or scheduling them so they can be managed.

Turning off UAC is indeed dangerous.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:PROACTIVETG
ID: 40242441
Understood. What we are really looking for is someone to help us run the C# code. See attached script.
0
 

Author Comment

by:PROACTIVETG
ID: 40249258
No one have an answer?
0
 
LVL 99

Expert Comment

by:John Hurst
ID: 40249282
Any code that registers DLL's or does like work, needs to run as Administrator and have UAC authorized at the time of the install. I have not seen installs as you wish run as an ordinary user.

So I think you have to run scheduled maintenance at the computers to do what you want.
0
 

Author Comment

by:PROACTIVETG
ID: 40253658
So what I'm asking is not possible?
0
 
LVL 99

Accepted Solution

by:
John Hurst earned 1000 total points
ID: 40253682
Yes. What you want by code is not possible in the same way that standard users cannot run things requiring admin credentials.
0

Featured Post

Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
In real business world data are crucial and sometimes data are shared among different information systems. Hence, an agreeable file transfer protocol need to be established.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses
Course of the Month18 days, 6 hours left to enroll

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question