Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: Run Batch File On Remote Computer Without PsExec


19 Jul 2012   #1

 
Run Batch File On Remote Computer Without PsExec

Ok imma give a full rundown of the situation. Currently on the network we are on because of the way it is setup wake on lan doesn't work, so SCCM has at best a 70 success rate for patching. So I am currently spending a couple days a week remoting into computers and running a batch file to manually update computers. I need a way, that isn't psexec to execute a batch file on a remote computer. If anyone has any ideas they would be greatly appreciated.

Additional Notes
- Batch file is on share drive atm.

My System SpecsSystem Spec
.

19 Jul 2012   #2

Windows 7 Ultimate x64 SP1
 
 

So, you are using RDP and remotely logging into the computer? If that's the case, you should be able to put the batch file on a network share, and then execute it while you are in the RDP session.
My System SpecsSystem Spec
19 Jul 2012   #3

Windows 7 Ultimate x64
 
 

An alternative may be to use telnet or SSH to login through command line and run the bat file from there, without the users even realizing there is something happening. You need to install the server first on each machine however.

Another thing that may work is to put the batch file on the startup menu folder of the start menu so that it runs on the next logon of each user. You can user the default security hole that Windows has because of the administrative shares (C$/D$ and so on). You only need a local administrator password on each computer only, which you can have if you're on a domain.
My System SpecsSystem Spec
.


19 Jul 2012   #4

 

Quote   Quote: Originally Posted by kegobeer View Post
So, you are using RDP and remotely logging into the computer? If that's the case, you should be able to put the batch file on a network share, and then execute it while you are in the RDP session.
Thats what we are doing, but when we have to remote into 200+ computers every other week its very tedious.

Quote   Quote: Originally Posted by Alejandro85 View Post
An alternative may be to use telnet or SSH to login through command line and run the bat file from there, without the users even realizing there is something happening. You need to install the server first on each machine however.
Hmmm not sure if i want to install that on every computer, but i'll check it out. Thx for the idea.

Quote   Quote: Originally Posted by Alejandro85 View Post
Another thing that may work is to put the batch file on the startup menu folder of the start menu so that it runs on the next logon of each user. You can user the default security hole that Windows has because of the administrative shares (C$/D$ and so on). You only need a local administrator password on each computer only, which you can have if you're on a domain.
We disable the local admin of each computer through the local GPO. Plus I wouldn't want to leave the local admin password just there in cleartext.
My System SpecsSystem Spec
20 Jul 2012   #5

Windows 7 Ultimate x64 SP1
 
 

We require all of our users to keep their systems powered on so we can apply updates. Do you have that policy?

Something else you could try - configure the BIOS on your computers to turn the systems on at a certain time. This way, if your users power down the system it will be up at a certain time, and it will receive the updates you push.
My System SpecsSystem Spec
20 Jul 2012   #6

 

Quote   Quote: Originally Posted by kegobeer View Post
We require all of our users to keep their systems powered on so we can apply updates. Do you have that policy?
Our current policy is to turn a computer to sleep mode after about 45 minutes of inactivity.

Quote   Quote: Originally Posted by kegobeer View Post
Something else you could try - configure the BIOS on your computers to turn the systems on at a certain time. This way, if your users power down the system it will be up at a certain time, and it will receive the updates you push.
This is an interesting idea, but we have a couple thousand computers and a handful of technicians.

Currently I am playing around with the idea of WMIC to just execute the batch file on the file server.
My System SpecsSystem Spec
20 Jul 2012   #7

Windows 7 Ultimate x64 SP1
 
 

Quote   Quote: Originally Posted by Hell Bomb View Post
Our current policy is to turn a computer to sleep mode after about 45 minutes of inactivity.
What's the reasoning behind that? We have thousands of computers at the Air Force base where I work, and the policy is to leave them on 24/7 so patches can be pushed. If it's for power saving, I don't think there's much difference, to tell the truth.

Quote   Quote: Originally Posted by kegobeer View Post
Something else you could try - configure the BIOS on your computers to turn the systems on at a certain time. This way, if your users power down the system it will be up at a certain time, and it will receive the updates you push.
This is an interesting idea, but we have a couple thousand computers and a handful of technicians.

Currently I am playing around with the idea of WMIC to just execute the batch file on the file server.[/QUOTE]

It will take a while, but I think it would definitely help your situation.
My System SpecsSystem Spec
20 Jul 2012   #8

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by Hell Bomb View Post
Quote   Quote: Originally Posted by Alejandro85 View Post
Another thing that may work is to put the batch file on the startup menu folder of the start menu so that it runs on the next logon of each user. You can user the default security hole that Windows has because of the administrative shares (C$/D$ and so on). You only need a local administrator password on each computer only, which you can have if you're on a domain.
We disable the local admin of each computer through the local GPO. Plus I wouldn't want to leave the local admin password just there in cleartext.
Hi, you don't need to enable the built in admin password for such a trick, any admin account will do really. I haven't tried that, but I think that domain administrators are automagically granted local administrator rights on every domain-joined computer, so you can use that user/password to get into every system.
My System SpecsSystem Spec
22 Jul 2012   #9

 

Quote   Quote: Originally Posted by Alejandro85 View Post
Quote   Quote: Originally Posted by Hell Bomb View Post
Quote   Quote: Originally Posted by Alejandro85 View Post
Another thing that may work is to put the batch file on the startup menu folder of the start menu so that it runs on the next logon of each user. You can user the default security hole that Windows has because of the administrative shares (C$/D$ and so on). You only need a local administrator password on each computer only, which you can have if you're on a domain.
We disable the local admin of each computer through the local GPO. Plus I wouldn't want to leave the local admin password just there in cleartext.
Hi, you don't need to enable the built in admin password for such a trick, any admin account will do really. I haven't tried that, but I think that domain administrators are automagically granted local administrator rights on every domain-joined computer, so you can use that user/password to get into every system.
That still leaves the issue with an admin account's password being stored in cleartext.
My System SpecsSystem Spec
22 Jul 2012   #10

Windows 7 Ultimate x64
 
 

Quote   Quote: Originally Posted by Hell Bomb View Post
Quote   Quote: Originally Posted by Alejandro85 View Post
Quote   Quote: Originally Posted by Hell Bomb View Post
We disable the local admin of each computer through the local GPO. Plus I wouldn't want to leave the local admin password just there in cleartext.
Hi, you don't need to enable the built in admin password for such a trick, any admin account will do really. I haven't tried that, but I think that domain administrators are automagically granted local administrator rights on every domain-joined computer, so you can use that user/password to get into every system.
That still leaves the issue with an admin account's password being stored in cleartext.
You may try to run the batch though the task scheduler, using the "run as user..." option. That way Windows takes cares of storing the password (don't know for sure, but I guess it has some form of encryption). Or manually run the script using the "run as another user" explorer context menu option, which ask for your password and it isn't saved at all.
My System SpecsSystem Spec
Reply

 Run Batch File On Remote Computer Without PsExec




Thread Tools




Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 04:44 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33