Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to build Firefox from source and I'm having trouble. I beleive the reason is UAC in Vista.

This question is similar to others asking about UAC but I'm wondering if it is possible for me to disable UAC for either a certain time frame (while I build) or until log out.

One might tell me that I could use the "Run as Administrator" option on whatever I'm trying to do. This doesn't work for my purposes. I need it completely off so every program that the build script is running can run with full admin permissions. Besides, I've already tried it.

I'm trying to solve issues with building and I'd like to take UAC completely out of the equation but, I don't want to disable UAC for the entire computer all of the time -- only when I'm about to build.

This question is related to: nsinstall: Bad file number error on Vista on Stack Overflow.

share|improve this question
up vote 0 down vote accepted

It appears that UAC in Vista is pretty engrained and to completely disable it you require a reboot.

there are guides online with single command line calls to disable it. But you will need to reboot, so your session is controlled by you, once your build is done you can re-enable it and reboot again.

Here is the guide on How-To-Geek.

Disable Command:

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f

Enable Command:

C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
share|improve this answer
Thanks.... As it turned out, disabling UAC didn't solve the problem... But this is good to know for my future reference. – Frank V Aug 31 '09 at 0:53
Ahh, that's fair enough. – Nick Josevski Aug 31 '09 at 0:56

On my vista box I have a quicklaunch shortcut that fires up the cygwin rxvt as administrator. If you are just using a dos box, you can't easily use the Compatibility property page because Vista recognizes cmd.exe, but if you just copy cmd.exe to your home folder ("notcmd.exe") then you will be able to run it "as administrator".

I even set my % prompt to # by isadmin && PS1='# '.


#include <stdio.h>
#define _WIN32_WINNT 0x0500
#include <windows.h>

    IN PSID SidToCheck,
    OUT PBOOL IsMember

int main (int argc, char **argv)
  PSID AdministratorsGroup;
  BOOL isAdmin;

  if (AllocateAndInitializeSid (&NtAuthority, 2,
          0, 0, 0, 0, 0, 0, &AdministratorsGroup) == 0 ||
      CheckTokenMembership (NULL, AdministratorsGroup, &isAdmin) == 0) {
      printf ("failed with win32 error %lu\n", GetLastError ());
      exit (2);

  FreeSid (AdministratorsGroup);
  exit (!isAdmin);
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.