Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.

Windows 7: why does windows 7 require elevation to administrator?

20 Dec 2014   #1

Windows 7 64-bit enterprise
why does windows 7 require elevation to administrator?


I have an application that is run from the command line. I cannot get the application to run without error unless I run as administrator. I have two newer versions of the same application that run just fine and do not require administrator. The differences in the code between the versions are not extensive and I can't figure out why the old version needs elevation to administrator to run. These applications were built with gnu cpp and don't have a manifest. The application is actually two binaries that communicate through shared memory. There is a parent process that launches a child process, passes data to the child, and receives data back. I don't know what this would have to do with anything because the versions that work do the same thing as the versions that don't.

Can anyone here shed any light on reasons why windows 7 would require administrator and possible work-arounds?


My System SpecsSystem Spec
20 Dec 2014   #2

Windows 7 Pro 64 bit

For security reasons Windows requires admin privileges to access many system resources. This has been a feature of the NT platform since the beginning. Each new version of Windows has tightened up security to meet the demands of the world of today. That creates some issues for applications designed for older operating systems, particularly when running with a non admin account. Needed resources that were accessible on older systems can no longer be accessed without an admin level account. Newer applications were designed for the more modern tightened security and they run as expected. They may not with a future OS.

Workarounds, if any, will depend on the details of the situation.
My System SpecsSystem Spec
20 Dec 2014   #3

Windows 7 64-bit enterprise

Thanks for the reply,

What I don't get is the fact that I have three versions of this application. On some systems, two versions work without administrator and one does not. The failure seems to be in the communication between the parent and child processes. With the oldest version, the parent is not allowed to communicate with the child without administrator. The parent/child communication part of the code has not been changed in the newer versions. The modified code is all in the child process. The child just does more processing now than in the older versions. The parent code and the shared memory code has not changed at all, nor has the compile, link, and build code in the make file. The gcc version is the same, as is the version of msvcrt.dll on all computers this has been tested on.

All three versions run properly on some systems, but the oldest version requires admin on some systems.

I'm not even sure where to start looking for the issue. What details can I add here that will be useful in narrowing down the possible issues? Please let me know if you have suggestions.

My System SpecsSystem Spec

20 Dec 2014   #4

Microsoft Windows 7 Home Premium 64-bit 7601 Multiprocessor Free Service Pack 1
Compare UAC settings

Maybe check UAC settings on each machine. Maybe they're not set up in the same way on each.

why does windows 7 require elevation to administrator?-user-account-control-settings.jpg

I never see those prompts but I'm using something that replaces UAC. Not recommended for most users.

My System SpecsSystem Spec
20 Dec 2014   #5
Layback Bear

Windows 10 Pro. 64/ version 1709 Windows 7 Pro/64


Is this computer still under the watchful eye of your I.T. Department?

getting programs to run at startup with UAC

The rig is out to IT getting some software and such installed. When I get it back, I will start with some of this.

I am looking forward to getting some win 7 rigs running as cleanly as my XP rigs.


My System SpecsSystem Spec
21 Dec 2014   #6

Windows 7 64-bit enterprise

Quote   Quote: Originally Posted by Layback Bear View Post
Is this computer still under the watchful eye of your I.T. Department
No, this is running fine on my computers, but those all now have UAC turned off and run under admin accounts anyway. They always have administrator if they need it. Most of my windows 7 computers are not connected to the internet and are just used for number crunching applications that I can't get on linux. To me, security is largely about making sure important stuff isn't on a computer with a wide area network connection.

The problem showed up when a colleague tried to use an older version of one of these apps on their computers and I have had to duplicate the issue on a w7 computer to try and get to the bottom of it. It seems as if the problem is either when the parent process tries to fork off a child process, or when the parent tries to IPC with the child process through shared memory. It's hard to understand why some versions work on non-admin accounts with UAC turned on and some don't. I have been looking for actions that w7 might considered protected and want elevation. I have ruled out basic permission and AV issues, which I always look at first. I have been trying to figure out if the older version has a different manifest, but manifest view says that there is no manifest, which I don't think is right.

At the moment, I am diffing though the code of the different versions to see if there are any differences in the src or makefile that might explain what is different in the newer versions that would account for them working. I don't know enough about UAC to know what to look for, so I thought I should post and see if anyone else has run into something similar. I am surprised that there is anything about a number crunching widget that would make w7 want administrator.

My System SpecsSystem Spec
26 Dec 2014   #7

Windows 7 64-bit enterprise

For all those of you who are following this thread and waiting for the outcome...

I was able to get the application to run without administrator privileges by setting both executables to run in windows 7 compatibility mode. The app was run from the command line as a non-elevated user. The program was run with pwd as the install directory on the C: drive. When run this way, there is no prompt for administrator and the program runs without error. This allows UAC to be left at the recommended level.

The program was compiled and built on windows 7, so it's odd that it has to run in windows 7 compatibility mode, especially when it runs on many w7 systems as is. I still have no idea why other versions of this app run with no modification, yet this versions requires different settings. I would expect w7 to require admin if protected resources or locations were needed. If a protected resource was needed, that is not something you should be able to shut off by changing the compatibility mode. If it is not needed, then why admin in the first place?

My System SpecsSystem Spec
26 Dec 2014   #8

Windows 7 Pro 32

The lack of manifest is most likely the problem. Without manifest: "at times UAC may not be able to accurately detect if the application needs to be elevated or not and you may end up with an elevation or credential prompt that is unwanted." source

What is the compatibility mode "Windows 7" I wonder. Maybe it's Windows 7 without SP1. Anyway it's a weird issue considering you've compiled it on a Win 7 machine. Maybe something changed in SP1 that doesn't work correctly in the version of your app you're having problems with. Or it's just the lack of manifest. Even if we can't exactly understand why, you should be lucky it worked with simply setting a compatibility mode

I checked the manifest of one of my apps (non-admin):
HTML Code:
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
        <!-- UAC Manifest Options
            If you want to change the Windows User Account Control level replace the 
            requestedExecutionLevel node with one of the following.

        <requestedExecutionLevel  level="asInvoker" uiAccess="false" />
        <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
        <requestedExecutionLevel  level="highestAvailable" uiAccess="false" />

            Specifying requestedExecutionLevel node will disable file and registry virtualization.
            If you want to utilize File and Registry Virtualization for backward 
            compatibility then delete the requestedExecutionLevel node.
        <requestedExecutionLevel level="asInvoker" uiAccess="false" />
My System SpecsSystem Spec
26 Dec 2014   #9

Windows 7 64-bit enterprise

Quote   Quote: Originally Posted by Tookeri View Post
What is the compatibility mode "Windows 7" I wonder.
I had exactly the same thought. I guess it could be for running apps that were built for windows 8.

I'm 100% not sure that my app is actually missing a manifest. I tried to use ManifestView to check it, and ManifestView says it can't find a manifest. I posted a bit on GNU about that and the message I got is that it would have been compiled with the "default manifest" unless I specified my own. I don't know why ManifestView can't find the manifest if there is one there. I guess I need to confirm this one way or another, but I'm not sure how. I haven't yet seen what the default manifest looks like.

My System SpecsSystem Spec
26 Dec 2014   #10

Windows 7 Pro 32

Try to open the app in Notepad and look for a HTML block. I tried and it was readable at the end of the file. Or search for the word manifest.
My System SpecsSystem Spec

 why does windows 7 require elevation to administrator?

Thread Tools

Similar help and support threads
Thread Forum
mmc.exe and others show "unknown publisher"; require elevation
hi friends I've had no changes to my system that I know of but "out of the blue" I have mmc.exe giving me an elevation request showing "unknown publisher" - hence a security or UAC issue. can someone point me to a valid thread that will steer me through a REAL answer? I have perused the flood...
Performance & Maintenance
CTRL+ALT+DEL - Require to Press to Approve UAC Elevation
How to Require Users to Press CTRL+ALT+DEL to Approve UAC Elevation This will show you how to require users to have to press Control+ALT+Delete to approve or enter the administrator's password on the Secure Desktop screen for a UAC prompt to elevate a running application in Vista and Windows 7....
UAC - Require a Password for Administrator
How to Configure UAC to Require a Password for Administrator While the UAC prompts seen when using a standard account may require a password, this is not the case while using an admin account. Once logged into the Admin account, a user can change anything only by clicking Yes on a user account...
IE9 Will Require Windows 7 SP1
LOL Details...
Windows 7 auto-elevation mistake lets malware elevate freely, easily
As you probably know by now, Windows 7 introduces some new in-between modes for User Account Control (UAC). By default, Windows 7 (beta thus far) ships with UAC configured at the “Notify me only when programs try to make changes to my computer.” level. As the UAC helper text indicates, “this...

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 19:06.
Twitter Facebook Google+