Creating directories under Program Files on Windows 7

November 25, 2010

Windows 7 has locked down the “Program Files” directory so that regular users can no longer create subdirectories. This presents a problem if you have an executable but no installer, and you want that executable to live under “Program Files”.

The way around that is pretty simple:

  1. Open the Explorer
  2. Navigate to C:\Windows and select explorer
  3. Right-click and select “Run as Administrator”
  4. Give permission to make changes to your system

At this point, the new Explorer that opens has enough rights to create subdirectories under Program Files (and also to hose your system in a number of interesting ways, so be careful).

Naturally, if you’re more command-line oriented, you could navigate to cmd.exe or sh.exe (assuming you’ve got Cygwin installed). If you’ve enabled the Administrator account, it’s possible to do all this using the RUNAS command:

runas /user:Administrator cmd