runas command in a bat file

G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

I have a bat file that runs on logon. I am not using GP for this but our
logon software. The problem is that in order for the bat file to work, it
needs admin rights. Can anyone tell me if there is a way to add the runas
command to a bat file.
Thanks for the help
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

You might have a look at "psexec" from www.sysinternals.com. It is part of
their free "pstools", an excellent collection of command line utilities. It
does exactly what you want and will even run commands remotely. HTH.
Louis

"Stacy" <Stacy@discussions.microsoft.com> wrote in message
news:A2BDD77F-F5BA-448F-8E28-B68E12919222@microsoft.com...
> I have a bat file that runs on logon. I am not using GP for this but our
> logon software. The problem is that in order for the bat file to work, it
> needs admin rights. Can anyone tell me if there is a way to add the runas
> command to a bat file.
> Thanks for the help
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

Thanks,
That seems to be working for me

"3c273" wrote:

> You might have a look at "psexec" from www.sysinternals.com. It is part of
> their free "pstools", an excellent collection of command line utilities. It
> does exactly what you want and will even run commands remotely. HTH.
> Louis
>
> "Stacy" <Stacy@discussions.microsoft.com> wrote in message
> news:A2BDD77F-F5BA-448F-8E28-B68E12919222@microsoft.com...
> > I have a bat file that runs on logon. I am not using GP for this but our
> > logon software. The problem is that in order for the bat file to work, it
> > needs admin rights. Can anyone tell me if there is a way to add the runas
> > command to a bat file.
> > Thanks for the help
>
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

"Stacy" <Stacy@discussions.microsoft.com> wrote in message
news:A2BDD77F-F5BA-448F-8E28-B68E12919222@microsoft.com...
>I have a bat file that runs on logon. I am not using GP for this but our
> logon software. The problem is that in order for the bat file to work, it
> needs admin rights. Can anyone tell me if there is a way to add the runas
> command to a bat file.
> Thanks for the help

Have a look at the SrvAny command available as a download from MS. It
allows any program, including batch files (invoked with cmd /c) to run as a
server and also set the user it should run as.

Roland
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

Look at
http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
for SrvAny...

"Stacy" <Stacy@discussions.microsoft.com> wrote in message
news:A2BDD77F-F5BA-448F-8E28-B68E12919222@microsoft.com...
>I have a bat file that runs on logon. I am not using GP for this but our
> logon software. The problem is that in order for the bat file to work, it
> needs admin rights. Can anyone tell me if there is a way to add the runas
> command to a bat file.
> Thanks for the help
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

Thanks, but that is not what I am looking for. the bat file makes changes to
the winnt folder and since my users are not admins, the bat file fails. It
does however work if it is run under admin rights. Considering I have to run
this on over 300 machines, I am trying to avoid going to each one myself.

"Roland Giesler" wrote:

> Look at
> http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
> for SrvAny...
>
> "Stacy" <Stacy@discussions.microsoft.com> wrote in message
> news:A2BDD77F-F5BA-448F-8E28-B68E12919222@microsoft.com...
> >I have a bat file that runs on logon. I am not using GP for this but our
> > logon software. The problem is that in order for the bat file to work, it
> > needs admin rights. Can anyone tell me if there is a way to add the runas
> > command to a bat file.
> > Thanks for the help
>
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

"Stacy" <Stacy@discussions.microsoft.com> wrote in message
news:4905502D-847F-418C-B604-9A109E35F3AE@microsoft.com...
> Thanks, but that is not what I am looking for. the bat file makes changes
> to
> the winnt folder and since my users are not admins, the bat file fails.
> It
> does however work if it is run under admin rights. Considering I have to
> run
> this on over 300 machines, I am trying to avoid going to each one myself.

I don't think there is an easy way to get past this, unless you have a
domain and use a policy to do this? If not, running the btach file as a
service will do exactly what you want and terminate on completion...

Maybe if you describe more accurately what you are trying to do, we could
help a little more?

regards

Roland

>
> "Roland Giesler" wrote:
>
>> Look at
>> http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
>> for SrvAny...
>>
>> "Stacy" <Stacy@discussions.microsoft.com> wrote in message
>> news:A2BDD77F-F5BA-448F-8E28-B68E12919222@microsoft.com...
>> >I have a bat file that runs on logon. I am not using GP for this but
>> >our
>> > logon software. The problem is that in order for the bat file to work,
>> > it
>> > needs admin rights. Can anyone tell me if there is a way to add the
>> > runas
>> > command to a bat file.
>> > Thanks for the help
>>
>>
>>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

I have a bat file that removes the games from a pc. I have it written in a
vbs script as well. I have tried running as a script and a bat file but the
commands must have admin rights to complete.
I am searching for a way to excute this without have to go to every pc and
manually do it.

"Roland Giesler" wrote:

> "Stacy" <Stacy@discussions.microsoft.com> wrote in message
> news:4905502D-847F-418C-B604-9A109E35F3AE@microsoft.com...
> > Thanks, but that is not what I am looking for. the bat file makes changes
> > to
> > the winnt folder and since my users are not admins, the bat file fails.
> > It
> > does however work if it is run under admin rights. Considering I have to
> > run
> > this on over 300 machines, I am trying to avoid going to each one myself.
>
> I don't think there is an easy way to get past this, unless you have a
> domain and use a policy to do this? If not, running the btach file as a
> service will do exactly what you want and terminate on completion...
>
> Maybe if you describe more accurately what you are trying to do, we could
> help a little more?
>
> regards
>
> Roland
>
> >
> > "Roland Giesler" wrote:
> >
> >> Look at
> >> http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en
> >> for SrvAny...
> >>
> >> "Stacy" <Stacy@discussions.microsoft.com> wrote in message
> >> news:A2BDD77F-F5BA-448F-8E28-B68E12919222@microsoft.com...
> >> >I have a bat file that runs on logon. I am not using GP for this but
> >> >our
> >> > logon software. The problem is that in order for the bat file to work,
> >> > it
> >> > needs admin rights. Can anyone tell me if there is a way to add the
> >> > runas
> >> > command to a bat file.
> >> > Thanks for the help
> >>
> >>
> >>
>
>
>
 
G

Guest

Guest
Archived from groups: microsoft.public.win2000.general (More info?)

You're welcome!
Louis

"Stacy" <Stacy@discussions.microsoft.com> wrote in message
news:DC23C2F3-988F-41AE-B2C9-C24529F99A19@microsoft.com...
> Thanks,
> That seems to be working for me
>
> "3c273" wrote:
>
> > You might have a look at "psexec" from www.sysinternals.com. It is part
of
> > their free "pstools", an excellent collection of command line utilities.
It
> > does exactly what you want and will even run commands remotely. HTH.
> > Louis
> >
> > "Stacy" <Stacy@discussions.microsoft.com> wrote in message
> > news:A2BDD77F-F5BA-448F-8E28-B68E12919222@microsoft.com...
> > > I have a bat file that runs on logon. I am not using GP for this but
our
> > > logon software. The problem is that in order for the bat file to
work, it
> > > needs admin rights. Can anyone tell me if there is a way to add the
runas
> > > command to a bat file.
> > > Thanks for the help
> >
> >
> >