Link to home
Start Free TrialLog in
Avatar of suribaba801
suribaba801

asked on

how to make a runas without a prompt for password

hello,
i have a very tough problem.  i have to update about 500 computers (1 msi file) and would like to do this with a bat file (user will execute the bat file,  ill send an email to the users with the network path to the file ) This bat file will copy the msi file to the C: and than execute it in quite mode ( /q ).  No problem till here!  But than i get the error message : "you dont have sufficient permissions ..." i spare the rest.

My question is whats the syntax for a "runas in dos" WITHOUT a prompt for the administrators password. (does it exists?)  (all clients have the same administators password !) ( installed os on the clients is W2k and XP Pro).

I hope some one can help

Bye everyone
Avatar of Pete Long
Pete Long
Flag of United Kingdom of Great Britain and Northern Ireland image

do you have a domain? if so why not just assign them the msi file in policy then you wont have this problem?
How to assign software to a specific group by using a Group Policy (2K)
http://support.microsoft.com/?kbid=302430
HOW TO: Assign Software to a Specific Group By Using a Group Policy in the Windows Server 2003 Family
http://support.microsoft.com/default.aspx?kbid=324750
Avatar of suribaba801
suribaba801

ASKER

i would like to keep this basic and do the job with a bat file (our GPO's are created on the corporate level and i dont have no access to the GPO's of AD)  Do you think that a "runas" WITHOUT the password prompt exists?  
Psexec from sysinternals allows you to run programs and commands on a local or a remote machine using the username and password in the command line.

http://www.sysinternals.com/ntw2k/freeware/psexec.shtml
yup it will mean putting the admin password in a script though :(

>>keep this basic and do the job with a bat file  

 OK But I can "fire and forget" an msi install package to over two thousand clients in less than two minutes
Anthony thanx for the tip...i also visit the sysinternals site, its very usefull...

Pete i know you are wright about the "keep basic", and thats why ill give it up trying it in DOS just bcz of the administrators password. but the major part of the clients are laptops (adsl - vpn) so they only connect to the network domain when they want to read emails or for intranet access.  

do you think this will be a problem for my AD ?
I used for the same thing a little freeware program called sanur.exe

you can find it at the following site :

http://www.commandline.co.uk/sanur_unsupported/index.html

Good-Luck

Dan


you will need to make an account on the network share. this account should have power users permissions if this is a windows server. leave the password blank and try again through dos.... "net use z: \\computer\directory", "copy c:\file.msi z:\"

if permissions are correct then a simple net use without username or pass supplied should work as long as the usernames match up.
if the username is something other than a common username (i.e. administrator) then you will need to supply it by using syntax "net use z: \\computer\directory /user:xxxxxx" where xxxxxx is the username
oh if you do need to supply a username and password then use:
"net use z: \\computername\directory /user:xxxxxx yyyyyy"
the xxxxxx is the username and yyyyyy is the password

Dear all,

Thank you all for your propositions.  I have completed the job with "lsrunase.exe".  i created a bat bile with "lsrunase.exe" in it and the local administrators username and password. (the positif side of all this is that "lsrunase" comes with a password encrypter.  So i encrypted the password so no one will have an idea what the password is!) which called other bat file with the msi file in it.

the runas function on windows os has been disabled.  Reason for this was like PETE said SECURITY.  Otherwise everyone would start to put their administrators password

So all users (restricted users)  have installed this software on their computer without local administrators rights and no one has a clue what the password is! isn't this great?

Now i dont know who gets the points i have put on this question?

Fill in the rest

Usage:

Autorunas "(insert command)"

This batch file should work.

---------AUTORUNAS.BAT---------
@ECHO OFF
SET USERNAME=(replace this with username)
SET PASSWORD=(replace this with password)
ECHO %PASSWORD%|runas /user:%USERNAME% %~1

Hello TheLearnedOne,

I have a question about experts-exchange and would be very glad if you can aswer:

If I post an issue and than I personally find a solution for my problem, who gets the points?

thanks

Suribaba801
ASKER CERTIFIED SOLUTION
Avatar of PAQ_Man
PAQ_Man
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial