Re: How to login any Windows Machine remotely using script
- From: "Al Dunbar" <alandrub@xxxxxxxxxxx>
- Date: Fri, 17 Jul 2009 17:51:37 -0600
"abrouf" <abrouf@xxxxxxxxx> wrote in message news:7dccc020-f0d6-4411-a20c-50a0f9526bed@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jul 17, 1:26 pm, "Pegasus [MVP]" <n...@xxxxxxxxxxxxx> wrote:"abrouf" <abr...@xxxxxxxxx> wrote in message
news:e68d560f-4828-43bf-a070-4c5bbfa6c4b8@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On Jul 16, 10:23 pm, "Pegasus [MVP]" <n...@xxxxxxxxxxxxx> wrote:
> "abrouf" <abr...@xxxxxxxxx> wrote in message
>news:24ef2468-dc9a-4210-b2fe-0d974ca4808a@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> On Jul 16, 1:36 pm, "Pegasus [MVP]" <n...@xxxxxxxxxxxxx> wrote:
> > "abrouf" <abr...@xxxxxxxxx> wrote in message
> >news:187dac00-dc28-47ec-a26d-cfd9e8dfbfac@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > On Jul 15, 11:50 pm, "Pegasus [MVP]" <n...@xxxxxxxxxxxxx> wrote:
> > > "abrouf" <abr...@xxxxxxxxx> wrote in message
> > >news:3a73a070-ab7a-45c3-a17c-13d41efa2c7e@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> > > > Hello,
> > > > I need to login any user's machine remotely as admin using > > > > VBScript
> > > > or
> > > > perl or any tools.
> > > > Could you please advise/provide if you have such scripts or > > > > tools?
> > > > Thank you in advance.
> > > > Abdur Rouf
> > > If a console session is sufficient then psexec.exe
> > > (www.sysinternals.com)
> > > is
> > > the usual tool.
> > Thank you guys for reply, I was trying use psexec
> > psexec \\s199at700 -u <user id> -p <password>
> > didn't work, but other commands work as expected.
> > Any advise?
> > ============
> > You forgot the command you want to run:
> > psexec \\SomePC -u UserID -p Password cmd.exe
> > If this does not work then you *must* report what error message you > > see.
> > Make sure to execute the command from a Command Prompt, not from the > > Run
> > box.- Hide quoted text -
> > - Show quoted text -
> Thank you Pegasus,
> Now I'm able to login. My requirement is to install application from a
> shared directory, but I can go to shared directory even if I mapped
> the shared directory to a drive letter and receiving such error:
> C:\>R:
> The system cannot find the drive specified.
> Any idea is greatly appreciated.
> ==============
> Under psexec.exe you can use exactly the same facilities as when you > are
> running a normal Command Prompt - except that there is no graphical > user
> interface. If mapping a drive does not work then this means that the
> account
> you use when launching psexec has insufficient access rights to the > shared
> folder.- Hide quoted text -
> - Show quoted text -
Thank you for the reply, it has full control, I did it alternatly,
copied all installation software at local directory, then ran the exe,
still no luck, returing without any error.
Any more advise is appreciated.
==============
I have used psexec.exe for many years and it has never let me down. It would
appear therefore that the problem is with you or with your machine but not
with psexec.exe. You could run this test:
1. Turn off *all* firewalls on the remote machine.
2. Turn off *all* firewalls on the server that hosts the share.
3. Create a batch file on the remote machine with the lines shown below.
4. Adjust the lines to suit your environment.
5. Use psexec.exe to log on to the remote machine as administrator.
6. Run the batch file.
7. Post the contents of the log file c:\test.txt.
@echo off
echo %date% %time% %UserName% >> c:\test.txt
net user "%UserName%" >> c:\test.txt
net use Q: \\SomeServer\SomeShare 1>>c:\test.txt 2>>&1
net use >> c:\test.txt
dir Q:\ 1>>c:\test.txt 2>>&1
copy %comspec% Q:\ 1>>c:\test.txt 2>>&1- Hide quoted text -
- Show quoted text -
Thank you pegasus for the nice script, my objective is to install an
application remotely using a shared resouces from command line. I'm
able to login the machine, now just I need to run setup.exe to install
an application, but when I type setup.exe, it goes back to command
prompt without any error message. It's mentioned that the local and
remote machines do not have firewall.
Any input is greatly appreciated.
Note that Pegasus said in an earlier reply: "except that there is no graphical user interface". Most setup.exe files appear in a graphical user interface, so do not work well with psexec. But all is not necessarily lost, as some such applications might provide a non-graphical interface option...
/Al
.
- References:
- How to login any Windows Machine remotely using script
- From: abrouf
- Re: How to login any Windows Machine remotely using script
- From: Pegasus [MVP]
- Re: How to login any Windows Machine remotely using script
- From: abrouf
- Re: How to login any Windows Machine remotely using script
- From: Pegasus [MVP]
- Re: How to login any Windows Machine remotely using script
- From: abrouf
- Re: How to login any Windows Machine remotely using script
- From: Pegasus [MVP]
- Re: How to login any Windows Machine remotely using script
- From: abrouf
- Re: How to login any Windows Machine remotely using script
- From: Pegasus [MVP]
- Re: How to login any Windows Machine remotely using script
- From: abrouf
- How to login any Windows Machine remotely using script
- Prev by Date: Re: How to login any Windows Machine remotely using script
- Next by Date: Re: Run VBScript as Task in 32 Bit Mode
- Previous by thread: Re: How to login any Windows Machine remotely using script
- Next by thread: Re: How to login any Windows Machine remotely using script
- Index(es):
Relevant Pages
|