# Emacs on Windows 7 bringing up UAC

I downloaded Emacs 23 and unzipped it into C:\Program Files (x86)\GNU\emacs-23.3, and I ran the addpm program to install it. This put it into the Start menu, but when I try to run Emacs, I get two pop-up issues from Windows. First, it asks whether I should trust this downloaded program. I check "don't ask again" and approve. Then I get the UAC asking for admin privileges. When I approve, Emacs comes up and seems to run normally.

I've tried installing it as a regular user and as an admin user. No matter what I do, it always asks those two questions every time I run it.

Clearly I have done something wrong in the installation, but I wonder what?

-

## migrated from stackoverflow.comJul 6 '11 at 23:52

This question came from our site for professional and enthusiast programmers.

Often windows requests admin rights to write to files within system directories. Program Files counts as a directory that needs admin rights to write to. I imagine Emacs writes to some file when running located within that directory and therefore asks for the admin rights to do so.

Try installing emacs into your documents or a subfolder therein.

**If this fixes the issue the problem is with the emacs install. If there's a config/data file it needs to write to regularily it should have placed the file in a public/unsecured directory.

-

Emacs almost certainly wants to write files in its installation directory which you have located in a directory which is read-only, even for admins, with UAC.

I always install emacs somewhere outside the program files folder.

-

You can fix this without having to move emacs though. Just use process explorer to look at what files it is opening and closing. Or perhaps which folders. Then move them to your User folder. Create hardlinks to the folders/files you moved with mklink. No more UAC.

-

Emacs doesn't write any files to its installation directory unless you tell it to by setting HOME to point there. Have you done that? Another possibility is that you have a .emacs file in C:\ (the old default HOME location from Emacs 21 and earlier), so Emacs is using C:\ as HOME rather than the new default of your user directory.

-