I have question how run file .bat as admin? How run cmd as admin in file bat?
I must run command on cmd: %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -px "MyKey" c:\key.xml -pri
Please help and have any tips or any good material.
I have question how run file .bat as admin? How run cmd as admin in file bat?
I must run command on cmd: %windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_regiis.exe -px "MyKey" c:\key.xml -pri
Please help and have any tips or any good material.
Use RUNAS
command for this purpose like below. See help using runas /?
in command prompt
runas /user:administrator "%windir%\Microsoft.NET\Framework\v2.0.5
0727\aspnet_regiis.exe -px "MyKey" d:\key.xml -pri"
Enter the password for administrator:
open start menu by pressing windows key type cmd
right click cmd
and select Run as administrator
this will open the command prompt in administrator mode and then you can run your command as an administrator.