8

My account in Windows 7 is an administrator account. When I open the Run box (WinKey + R), I am warned, "This task will be created with administrative privileges."

enter image description here

Is there any way to run programs as myself, but without administrative privileges when logged in as an administrator?

Hennes
  • 64,768
  • 7
  • 111
  • 168
kpozin
  • 1,658
  • 8
  • 24
  • 29

4 Answers4

9

Yes.

Turn UAC back on!

Technically, the program will still run under the context of your account, but UAC will prevent system wide changes without authentication first.

The only other option is to create shortcuts and then right click, and choose Run as different user then choose an account which does not have administration rights. enter image description here

William Hilsum
  • 116,650
  • 19
  • 182
  • 266
  • In general, I prefer UAC to be off, since I do a ton of development work where UAC would get in the way. But a web browser, for example, I would want to run unprivileged, to minimize the risk of getting hit by browser exploits. – kpozin Feb 08 '11 at 14:45
  • 3
    UAC shouldn't get in the way of development if done correctly.... What sort of problems do you actually have? (Only problems I have is during setup/patching) – William Hilsum Feb 08 '11 at 15:08
4

You need to turn on User Account Control:

  1. Go to Control Panel ⇨ User Accounts and Family Safety ⇨ User Accounts
  2. Click on Change User Account Control settings
  3. Select the Default level
  4. click [OK]
  5. Reboot
Synetech
  • 68,243
  • 36
  • 223
  • 356
Ritz
  • 41
  • 2
2

runas /trustlevel:0x20000 cmd.exe will e.g. launch a command prompt that believes it's an admin (if originally launched as such) but does not have elevated privileges like writing to C:\Windows\. This even works for installing e.g. msi packages that only require elevated privileges since by default they want to install to C:\Program Files (plus minus (x86)). Source: this SU answer

Tobias Kienzler
  • 4,421
  • 7
  • 44
  • 76
  • I have a problem where a program works when invoked from user command prompt but not from admin command prompt for the same user. In the admin prompt, I tried `runas /trustlevel:0x20000 ...` but the program still does not work. The only way to run it from admin prompt, is to `runas /user:thesameuser cmd ...`. This opens a new prompt that is truly user-level (and where the program runs just fine). This option, however, runs into an issue with password, and /savecred is not helping for some reason. So, **how can one, from user's admin prompt run something as plain user w/o providing pwd?** – Petr Vepřek May 11 '17 at 12:45
1

While one could argue you're doing things somewhat backwards, if you insist, you could look at:

DropMyRights

Process Explorer/Psexec

Kevin Panko
  • 7,346
  • 22
  • 44
  • 53
Craig H
  • 1,242
  • 11
  • 13
  • 1
    Note that while using DropMyRights or related software for browsers and other high-risk applications will certainly add to the security, it is nowhere near a proper alternative for the only actual solution, fully subscribing to William Hilsum's use of the exclamation mark: turn UAC back on! – Marcks Thomas Nov 25 '12 at 18:56