آمـــــوزش شـــــبکه

آمـــــوزش شـــــبکه

............ Network Learning ............
آمـــــوزش شـــــبکه

آمـــــوزش شـــــبکه

............ Network Learning ............

اجرای برنامه ها با مجوز Administrator توسط دستور Run As





What is Run As ?

 

Runas , Allows a user to run specific tools and programs with different permissions than the user's current logon provides.

 


 

Use the Run As , by using a shortcut :

 

1. Press SHIFT and hold while you right-click the shortcut item, and then click Run as

 

2. In Run As, click the the following user option, type or select the User name, type the Password, and then click OK.




Use the Run As , by command Prompt (CMD) :


To start an instance of the command prompt (CMD) as an administrator on the local computer, type:


runas /user:localmachinename\administrator cmd


When prompted, type the administrator password.




To start an instance of the Computer Management snap-in using a domain administrator account called companydomain\domainadmin, type:


runas /user:companydomain\domainadmin "mmc %windir%\system32\compmgmt.msc"


When prompted, type the administrator password.

 



To start an instance of Notepad using a domain administrator account called user in a domain called domain.microsoft.com, type:


runas /user:user@domain.microsoft.com "notepad my_file.txt"


When prompted, type the administrator password.

 



To start an instance of a command prompt window, saved MMC console, Control Panel item, or program that will administer a server in another forest, type:


runas /netonly /user:domain\username "command"


domain\username must be a user with sufficient permissions to administer the server.


When prompted, type the administrator password.

 



Examples:


runas /user:ComputerName\administrator cmd  (or
) another Programs


runas /user:ComputerName\administrator control (or) controlpanel


runas /user:ComputerName\administrator "mmc  %windir%\system32\compmgmt.msc"




If you want to use this command as a domain administrator, type one of the following:


/user:DomainName\AdministratorAccountName

Or

/user:AdministratorAccountName@DomainName



runas /user:DomainName\administrator "mmc %windir%\system32\dsa.msc"


runas /user:administrator@DomainName.com "mmc %windir%\system32\dsa.msc"




for Sample ; Run "WinRar" Application by locally :

PC name : PC001

User Name : User001

App Name : WinRar.exe


runas /user:PC001\User001 "C:\Program Files\ WinRAR\ Winrar.exe "




::::: Note :::::

Finally save
this command as a text file and convert .TXT format to .BAT and create a Batch file, for run automatically commands.