Terry Dunlap | 6 Mar 2007 01:48
Picon
Favicon

RUN AS.....

I am needing to run an executable on over 300 machines. It requires admin rights to do so. Is 
there a way in a batch file to pass the admin user name and password so as to run the 
executable in the the form of RUN AS... so I can put it in a login script?

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Something is new at Yahoo! Groups.  Check out the enhanced email design.
http://us.click.yahoo.com/kOt0.A/gOaOAA/yQLSAA/D.ewlB/TM
--------------------------------------------------------------------~-> 

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@... 
Terry Dunlap | 6 Mar 2007 02:07
Picon
Favicon

Re: RUN AS.....

--- In batchworld@..., "Terry Dunlap" <ace_man47 <at> ...> wrote:
>
> I am needing to run an executable on over 300 machines. It requires
admin rights to do so. Is 
> there a way in a batch file to pass the admin user name and password
so as to run the 
> executable in the the form of RUN AS... so I can put it in a login
script?
>

OK, I found part of the answer.

runas /user:mac\administrator program.exe

this still asks for the password. Is there a way to perhaps put that
in a text pad and have the prompt read the text to get the password
and finish running?

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Great things are happening at Yahoo! Groups.  See the new email design.
http://us.click.yahoo.com/lOt0.A/hOaOAA/yQLSAA/D.ewlB/TM
--------------------------------------------------------------------~-> 

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@... 
thriftybill | 6 Mar 2007 04:57
Picon
Favicon

test post

Can I post with html here like <a href="http://www.yahoo.com">this.</a>

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@... 
foxidrive | 6 Mar 2007 05:38

Re: test post

On Tue, 06 Mar 2007 03:57:08 -0000, "thriftybill" <thriftybill@...>
wrote:

>Can I post with html here like <a href="http://www.yahoo.com">this.</a>

The code you can, in plain text.

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@... 
Morris, Lamar | 6 Mar 2007 11:28
Picon
Favicon

RE: Re: RUN AS.....

Try this, runas /user:mac\administrator password program.exe

Lamar

________________________________

From: batchworld@...
[mailto:batchworld@...] On
Behalf Of Terry Dunlap
Sent: Monday, March 05, 2007 7:08 PM
To: batchworld@...
Subject: [BATCH WORLD] Re: RUN AS.....

--- In batchworld@... <mailto:batchworld%40yahoogroups.com>
, "Terry Dunlap" <ace_man47 <at> ...> wrote:
>
> I am needing to run an executable on over 300 machines. It requires
admin rights to do so. Is 
> there a way in a batch file to pass the admin user name and password
so as to run the 
> executable in the the form of RUN AS... so I can put it in a login
script?
>

OK, I found part of the answer.

runas /user:mac\administrator program.exe

this still asks for the password. Is there a way to perhaps put that
in a text pad and have the prompt read the text to get the password
(Continue reading)

Derek Byrne | 6 Mar 2007 12:49
Picon
Favicon

RE: Re: RUN AS.....

Hi!

I had a requirement recently to run something similar on a few hundred
machines, try this:

http://www.commandline.co.uk/sanur/

It is called Sanur.

The string you're looking to implement would possibly look like this:
(beware, this might wrap to the next line)

runas /noprofile /user:<DOMAIN>\<USER>
"%logonserver%\NETLOGON\WPA_Patch\WindowsXP-KB893357-v2-x86-ENU.exe
/quiet /norestart" | %logonserver%\netlogon\sanur <PASSWORD>

Or, if you run sanur from CMD prompt, it will give you the following
info:

SANUR v1.0.3.1 Commandline RUNAS Automation Utility for 2000/XP/2003.
Copyright (c) 2001-2003 Ritchie Lawrence, http://www.commandline.co.uk.

RUNAS <options> | SANUR password
RUNAS <options> | SANUR /i [drive:][path]filename

/i Pipes the password from the specified file into RUNAS

Example usage:-

runas /u:domain\username program.exe | sanur pa55w0rd
(Continue reading)

droidmcse | 6 Mar 2007 16:38

Re: RUN AS.....

Why not use psexec from the pstools? 
http://www.microsoft.com/technet/sysinternals/utilities/pstools.mspx

you could easily do:
psexec \\computername -u user -p password command.exe

The command has to be in the destination path.  if it's a local batch
file on your machine, add the -c switch and it will copy it to the
destination box.  Also tossing in the -d will have it NOT wait for the
process to finish, and -i if it needs to interact w/ the desktop.

Just my two cents worth....

--- In batchworld@..., "Derek Byrne" <Derek.Byrne <at> ...> wrote:
>
> Hi!
>  
> I had a requirement recently to run something similar on a few hundred
> machines, try this:
>  
> http://www.commandline.co.uk/sanur/
>  
> It is called Sanur.
>  
> The string you're looking to implement would possibly look like this:
> (beware, this might wrap to the next line)
>  
> runas /noprofile /user:<DOMAIN>\<USER>
> "%logonserver%\NETLOGON\WPA_Patch\WindowsXP-KB893357-v2-x86-ENU.exe
> /quiet /norestart" | %logonserver%\netlogon\sanur <PASSWORD>
(Continue reading)

Morris, Lamar | 6 Mar 2007 16:57
Picon
Favicon

RE: Re: RUN AS.....

Here is a script written by Ken Mazie (thanks Ken) that does what you
wanted to do in your original request. It uses password.txt to read a
password list. The execute section is where you do the programs. Watch
out for wrapped lines.

::intent is to enumerate a domain, connect to the machines, and push out
updates.

:: Right now it's set up to parse a text file looking for the machines
to hit.

:: Written by Ken Mazie

:: <at> echo off

cls

:variables

:: set all initial variables here

set password=

set domain=

set admin=administrator

set match=no

:getdate
(Continue reading)

Terry Dunlap | 6 Mar 2007 17:09
Picon
Favicon

Re: RUN AS.....

I appreciate all of the help with this. I have tried several things,
batch file, VBScript, PsExec and I have found several solutions. The
problem now it that the windows update I am running
WindowsXP-KB931836-x86-ENU.exe requires you click "I agree" to the
license. I haven't been able to get the done unattended. I have tried
a variety of switches, including /q /u /s /passive /quiet, all to no
avail. Any ideas? I need this to run without interaction from my
users. This would only confuse them to click "next" "I agree" and
"finish". (sorry for the sarcasm)

--- In batchworld@..., "Morris, Lamar" <LamarMorris <at> ...>
wrote:
>
> Here is a script written by Ken Mazie (thanks Ken) that does what you
> wanted to do in your original request. It uses password.txt to read a
> password list. The execute section is where you do the programs. Watch
> out for wrapped lines.
> 
>  
> 
> ::intent is to enumerate a domain, connect to the machines, and push out
> updates.
> 
> :: Right now it's set up to parse a text file looking for the machines
> to hit.
> 
> :: Written by Ken Mazie
> 
> :: <at> echo off
> 
(Continue reading)

Marc Peterson | 6 Mar 2007 17:31
Picon

RE: Re: RUN AS.....

According to the switches indicated by WindowsXP-KB931836-x86-ENU.exe /?,
/quiet or /passive should do what you need.  I always do this and have never
had a problem, but I've only done it on local machines.  Since you're
sending the command to a remote machine, you might need to use quotes to
pass the entire command string including arguments.

> -----Original Message-----
> 
> I appreciate all of the help with this. I have tried several things,
> batch file, VBScript, PsExec and I have found several solutions. The
> problem now it that the windows update I am running
> WindowsXP-KB931836-x86-ENU.exe requires you click "I agree" to the
> license. I haven't been able to get the done unattended. I have tried
> a variety of switches, including /q /u /s /passive /quiet, all to no
> avail. Any ideas? I need this to run without interaction from my
> users. This would only confuse them to click "next" "I agree" and
> "finish". (sorry for the sarcasm)

------------------------ Yahoo! Groups Sponsor --------------------~--> 
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/hOt0.A/lOaOAA/yQLSAA/D.ewlB/TM
--------------------------------------------------------------------~-> 

To Post a message, send it to:   batchworld@...

To Unsubscribe, send a blank message to:
batchworld-unsubscribe@... 

Gmane