0

I am currently testing permissions as an administrator and need to test something as a standard user. There are ways to make standard users run as administrator, but I can't think of a way to run as a standard user as an administrator. If I were to remove my administrator rights, it would take awhile for IT to give me my admin rights back. Is there a better option that doesn't include setting up my dev environment as another user? I'm trying to run Visual Studio as a standard user, if that helps.

Thanks in advance

angularman
  • 11
  • 1
  • It might help to clarify what version of Windows and if UAC is enabled. And if you mean running as a user with admin or if you mean running the process elevated. If you're an admin and launch a process it doesn't normally get admin permissiosn unless you launch it elevated *run as administrator*. – Andy Sterland Mar 18 '19 at 16:16
  • Visual Studio would require me running as administrator and I needed to see something on a standard user. The solution actually involved changing the registry and then running without privileged elevation. – angularman Mar 18 '19 at 16:50
  • Possible duplicate of [Win32 - Launching a highestAvailable child process as a normal user process](https://stackoverflow.com/questions/50298722/win32-launching-a-highestavailable-child-process-as-a-normal-user-process) – cbuchart Apr 01 '19 at 06:43

1 Answers1

1

Create a file with the contents "filename.reg":

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT*\shell\forcerunasinvoker] @="Run without privilege elevation"

[HKEY_CLASSES_ROOT*\shell\forcerunasinvoker\command] @="cmd /min /C \"set __COMPAT_LAYER=RUNASINVOKER && start \"\" \"%1\"\""

Run the file and apply registry changes, and then right click "Run without privilege elevation" on the file that needs to be tested. Found this solution from another thread! Thanks!

angularman
  • 11
  • 1
  • This works, but note that the formatting got slightly messed up. Should be a backslash between ROOT and * and probably a newline before both @ lines. – Willie Apr 13 '21 at 23:59