Tuesday, 26 June 2018

How to call a program to be run with admin privileges but under the same user (Windows Command Prompt)

I need to invoke a program with admin privileges from command prompt. it should prompt to the user an alert such as:


enter image description here


I found many answers like:


runas.exe /user:administrator %~dp0\MY_PROGRAM.BAT

But it does not help me, because that in this way, the program run under Administrator account while I need this program to be run under the same user that invokes my script.


I'm working on Win7/8 and Server 2008 R2

No comments:

Post a Comment

Where does Skype save my contact's avatars in Linux?

I'm using Skype on Linux. Where can I find images cached by skype of my contact's avatars? Answer I wanted to get those Skype avat...