1

If I am an administrator and I run a program under a standard user account (shift + right click -> run as different user), which user's environment is used? The program in question happens to read some keys from the current user registry hive. Will it use the registry hive of the user that launched the application (the administrator in this case) or the user the program is being run under? I have a feeling the answer is the latter. If that is the case is it possible to run the program as the standard user but have it use my environment? Is that an absurd thing to even try and do?

I'm trying to understand why the user is having issues connecting to a web service. The program in question happens to be the client that connects to the service. I first tried running some tests with PowerShell (sending HTTP requests as the user) but the results were... more confusing than helpful. I want to run the client itself as the user and monitor what happens but if I do so using their environment it will send real data to the service - possibly causing issues with their service. My personal environment is set up to use a demo account and will not muck anybody's service

  • What is the purpose of doing what you want? – Moab Sep 18 '15 at 15:17
  • Trying to understand why the user is having issues connecting to a web service. The program in question happens to be the client that connects to the service. I first tried running some tests with PowerShell (sending HTTP requests as the user) but the results were... more confusing than helpful. I want to run the client itself as the user and monitor what happens but if I do so using their environment it will send real data to the service - possibly causing issues with their service. My personal environment is set up to use a demo account and will not muck anybody's service. – Jason Boyd Sep 18 '15 at 15:31
0

I would say, by using "run as" you're stil using your original environment. The only result of "run as" will be that the process will run with the rights (read/write/execute) of another user. So to say, you stay in context of your own acoount. Surely you can change your environment variable as well by doing this explicitly like this: Windows 7: How To Set Environment Variable without Admin Access.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.