Solved

runas command with password

Posted on 2011-09-19
6
881 Views
Last Modified: 2012-05-12
Hi,

I`m trying to create a batch script that runs an application as admin.

My problem is that i can`t enter the password into the script... from what i`ve read around it seems runas doesn`t accept a password parameter. Can you please give me any alternatives?

Thank you
0
Comment
Question by:newVtech
  • 3
  • 2
6 Comments
 
LVL 27

Expert Comment

by:Thomas Zucker-Scharff
ID: 36561675
Ibelieve AutoIT can take a password as a parameter and then it creates a script as an exe so the password is not as easily seen.  There is a free trial on their site http://www.autoitscript.com/site/autoit/
0
 

Author Comment

by:newVtech
ID: 36561890
I`ve tried autoit some time ago. But i need something that is small preferably just an executable that does exactly what runas does and also accepts passwords.
0
 
LVL 13

Expert Comment

by:Govvy
ID: 36561979
What about the runas /savecred switch?
0
How our DevOps Teams Maximize Uptime

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us. Read the use case whitepaper.

 

Author Comment

by:newVtech
ID: 36562019
Well for the /savecred switch to work you would have to enter the pass once.
I`d prefer to have it in a nice script... I`m thinking of something like:

 runas /user:domain\name /password:pass <command>

If i use this script to install software onto 50 pcs i`ll have to type the password in each time. I want everything automated :)
0
 
LVL 13

Accepted Solution

by:
Govvy earned 500 total points
ID: 36562223
I see. Runas wont do this: http://blogs.msdn.com/b/oldnewthing/archive/2004/11/29/271551.aspx

Use PSEXEC from WinInternals instead
0
 

Author Comment

by:newVtech
ID: 36562305
Ok that seems to have worked. Thank you.
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Our Group Policy work started with Small Business Server in 2000. Microsoft gave us an excellent OU and GPO model in subsequent SBS editions that utilized WMI filters, OU linking, and VBS scripts. These are some of experiences plus our spending a lo…
Scenario: Your operations manager has discovered an anomaly in your security system. The business will start to suffer within 15 minutes if it is a major IT incident. What should she do? We have 6 recommendations for managing major incidents (https:…
This video shows how to use Hyena, from SystemTools Software, to bulk import 100 user accounts from an external text file. View in 1080p for best video quality.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

830 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question