2

My IT organization has granted me admin rights on my Windows 7 desktop as I need them to do my day-to-day job. However, I occasionally need to test something as if I were a regular user. I could remove myself from the local "Administrators" group, but then I'd be stuck unable to add myself back.

Does Windows 7 provide any way to run as if admin rights were not held, but to not actually lose those rights and to be able to return to running with full admin rights at will?

I am permitted only one account, so I cannot have both a regular and an admin account.

3
  • 1
    By default Windows runs all processes at the lowest permission the user has unless specifically escalated, with "run as Administrator"
    – Ramhound
    May 14, 2018 at 20:41
  • Vote to close since this is a work PC and more than likely on a domain.
    – Moab
    May 14, 2018 at 23:33
  • I am unsure why this being a work-related question or the fact my computer is on a domain (which indeed it is) would make this question off-topic for this forum. In any case, I have posted an answer I believe others may find useful.
    – Dave
    May 15, 2018 at 13:04

1 Answer 1

1

As near as I can tell, the following command, if issued in a command prompt, will run a command without privileges:

runas.exe /trustlevel:0x20000

Using arp -d * as an example, I find that it will succeed in a command prompt I launched in the normal way (i.e. an Administrator command prompt, since I am a member of Administrators), and it will fail in a command prompt launched with the command runas.exe /trustlevel:0x20000 cmd.

3
  • You shouldn't use trustlevel, it's legacy, and it's working for an entirely different reason. As I hinted at, the default permissions of a command, if run an in non-elevated command prompt would be that of a normal user anyways.
    – Ramhound
    May 18, 2018 at 3:20
  • If I am an administrator, how do I create a non-elevated command prompt other than using the command I gave above?
    – Dave
    May 18, 2018 at 3:24
  • If you run command prompt, by default unless you escalate the permissions of command prompt, it will not be elevated. This means any process that requires elevation, will fail, even if the command prompt was launch as an Administrator. You have to specifically, elevate the permissions of Command Prompt, with "run as Administrator" to increase the permissions of the command prompt process. /trustlevel:0x20000 isn't designed to work on Windows Vista or newer.
    – Ramhound
    May 18, 2018 at 3:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .