Programs Run Through The Command Runas / savecred

Reading time: less than 1 minute

Often comes across to give administrative permissions to ordinary user in certain software. There is no need to give permissions locally but only in certain application using the Runas command / Savecred (Save User Credentials)

You can run applications as an administrator running runes (run as) in two ways, Command Line and by GUI:

Graphic mode: Then right-click on the executable file, and use the Run option's or Portuguese How to run, will open a window asking for user and administrator password.

Command Line: open the DOS prompt (Start >> Run >>type it: cmd), type at the prompt: runas / user: "Full path to the executable"

Using the Run As with attribute / savecred (Save User Credentials):

 

In your company or in your home you may encounter the following situation. You need to run an application on your personal computer or a workstation in the company, requiring a user with administrative profile.

For this scenario it is best to create an application using the shortcut “runas /savecred /user:”

1) Install the program that you will use, using an installation permission to account.

2) Create a user with administrator profile on the device where you want to run the application as administrator. OBS: As an example I will create a user called "administrator"And use the program notepad.exe to run as administrator.

2.1) create a Shortcut on the Desktop thus :

2.2) Right button on the desktop >>New >> Shortcut, in the window that opens enter the following command:

runas /savecred /user:cardoso "C:\Windowsnotepad.exe”

or

runas /savecred /user:domain user “C:\Windowsnotepad.exe”

(where the domain can also be the hostname, if the administrative account is local).

runasnotepad

then click advance, Enter a name for your shortcut and click conclude.

3) Run once the shortcut, a command prompt window will appear asking for user password with which we execute the program, in our example the administrator password.

runassenha

Soon, the next time you or a member of your company run the application-created shortcut, the software automatically will use the user with administrator profile and does not prompt for the password more.

There is no risk of the user to know the password entered or try “Edit” the file and see the command.

7 Comments


  1. How can run the runes with a program that automatically runs a database so that the application reads

    Reply

  2. Hello, but this creates a security hole because changing only the exe path could run any program.

    Reply

    1. Good afternoon,

      When you do this on other shortcuts, for the first time, the system will ask you for the administrator password; the command by itself will not give authorization, the first time you run the shortcut with this command you have to put the administrator user password, or the user password you used in the command.

      Reply

  3. How to solve the problem, the most advanced user, copy the command and paste into other executable?

    Reply

    1. Good afternoon,

      When you do this in other shortcuts, for the first time, the system will ask the administrator password; only the command will not give permission, the first time you run the shortcut with this command you have to put the admin user password, or the user password that you used the command.

      Reply

      1. I think they wanted to say the following about the security breach:

        -Open shortcut properties (for which runas with a saved password has been configured)
        -Change the path that is there to the path of any other installed program but without a saved password (or even any executable that hasn't even been installed yet).
        And do not copy the entire path of that shortcut and paste it into the path field of another shortcut that the password has not been saved.

        Reply

        1. Good afternoon

          No problem, the system will ask for the password again. It will not let you change the path of the executable, to be called, and keep the password that was saved, it will ask for the password again.

          Reply

Leave a Reply to phol Cancel reply

Your email address will not be published. Required fields are marked *