I am writing a batch file that I will distribute among users. I need to run some commands with elevated permissions. My initial solution was to use:
runas /noprofile /user:Administrator SOME_COMMAND
However many machines (including mine) have the hidden Administrator account inactive and so do not have an administrator password set up. I can also not specify another user name since different machines will have different users. Is there a way to replicate the "right click -> Run as Administrator" action via a batch file? I do not mind the prompt popping up, I just do not want the user to explicitly right-click and run as administrator.