'Run as..' command

Discussion in 'Windows OS's' started by arunmir, Dec 27, 2006.

  1. arunmir

    arunmir Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Can I create a shortcut to a application that can executes the application in different user (Administrator) as the function of 'Run as..' command.
     
  2. Willz

    Willz MiCrO$oFt $uK$ :D

    Likes Received:
    36
    Trophy Points:
    48
    Why would you need to do this? the Run As command is in start bar.
     
  3. megamaced

    megamaced Geek Geek Geek!

    Likes Received:
    0
    Trophy Points:
    36
    No Willz, he means Run As, not Run :)

    arunmir, you would have to create a batch script. Launch notepad and type in a DOS command such as:

    Code:
    runas /user:your_computer_name\administrator c:\program files\program\program.exe
    Save the file, then change the file format from .txt to .bat
     
  4. RHochstenbach

    RHochstenbach Administrator

    Likes Received:
    26
    Trophy Points:
    48
    You can also use this command as a shortcut on the desktop. Just rightclick the desktop, go to New > shortcut.
    Then enter runas /user:ComputerName\administrator location of program. If you launch the shortcut, it will ask for your administrator password. Enter it, then press ENTER or RETURN. You can also replace the Administrator with another username. If the path to the executable file has spaces between it (like C:\program files), then put the path to the executable file between two "-marks. For example: instead of using C:\program files\program.exe, you should enter "C:\program files\program.exe".
     
  5. arunmir

    arunmir Geek Trainee

    Likes Received:
    0
    Trophy Points:
    0
    Thank you very much. I have already seen this method in windows help; But I can't understand it clearly. I can understood through your answers.
    But I have another doubt.
    Can I set the shortcut that can enter the password automatically?
     
  6. RHochstenbach

    RHochstenbach Administrator

    Likes Received:
    26
    Trophy Points:
    48
    Use this command: runas /savecred /user:computername\Administrator Location of program. At the first start of the shortcut, it will ask your for the account password. But then it will be saved. If you run the shortcut again, it will not ask you for the password. However this might not work on XP Home Edition, as it can't manage these options.
     

Share This Page