Welcome guest. Before posting on our computer help forum, you must register. Click here it's easy and free.

Author Topic: Runas command: auto fill password  (Read 12999 times)

0 Members and 1 Guest are viewing this topic.

Blackberry

    Topic Starter


    Adviser
  • For those with wings, fly to your dreams.
    Runas command: auto fill password
    « on: April 06, 2008, 06:29:08 AM »
    Hi,
    Does anyone know how to auto fill the password in the runas command in the console under windows vista.
    E.G. I type runas /user:blackberry "cmd.exe", then I get the question give the password, but I would like to have that the batch file auto gives that password. Any ideas?

    Thanks in advance

    Blackberry  :)
    Everybody knows you can't click here. But I know you will try it :)

    Sidewinder



      Guru

      Thanked: 139
    • Experience: Familiar
    • OS: Windows 10
    Re: Runas command: auto fill password
    « Reply #1 on: April 06, 2008, 05:50:36 PM »
    You might try to pipe the password into the command. Don't know if it will work but do know that blank passwords are not accepted.

    Code: [Select]
    echo password | runas /user:blackberry "cmd.exe"

    Code like this is a security breach and MS may disallow it. 8)

    Does not the user parameter need to be in DOMAIN\USER format?
    The true sign of intelligence is not knowledge but imagination.

    -- Albert Einstein

    blastman



      Hopeful

      Re: Runas command: auto fill password
      « Reply #2 on: April 07, 2008, 01:41:29 AM »
      sadly the 'runas' command won't let you pipe the password as it is as sidewinder has said and locked down as a security feature.

      someone else asked this not to long ago. I think they got it working by using pstools, psexec is designed to run apps on remote machines, but i see no reason why you couldn't get it run on the local machine.

      psexec will allow to hardcode a password into the batch.

      hope it helps.

      Blastman, you are the man. Thank You Very Much!!!!!!!!!