Run Batch File On Remote Computer Without PsExec

Page 1 of 2 12 LastLast

  1. Posts : 55
    Windows 7
       #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.
    Last edited by Hell Bomb; 19 Jul 2012 at 22:54.
      My Computer


  2. Posts : 2,913
    Windows 7 Ultimate x64 SP1
       #2

    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 Computer


  3. Posts : 2,467
    Windows 7 Ultimate x64
       #3

    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 Computer


  4. Posts : 55
    Windows 7
    Thread Starter
       #4

    kegobeer said:
    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.

    Alejandro85 said:
    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.

    Alejandro85 said:
    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 Computer


  5. Posts : 2,913
    Windows 7 Ultimate x64 SP1
       #5

    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 Computer


  6. Posts : 55
    Windows 7
    Thread Starter
       #6

    kegobeer said:
    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.

    kegobeer said:
    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 Computer


  7. Posts : 2,913
    Windows 7 Ultimate x64 SP1
       #7

    Hell Bomb said:
    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.

    kegobeer said:
    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 Computer


  8. Posts : 2,467
    Windows 7 Ultimate x64
       #8

    Hell Bomb said:
    Alejandro85 said:
    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 Computer


  9. Posts : 55
    Windows 7
    Thread Starter
       #9

    Alejandro85 said:
    Hell Bomb said:
    Alejandro85 said:
    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 Computer


  10. Posts : 2,467
    Windows 7 Ultimate x64
       #10

    Hell Bomb said:
    Alejandro85 said:
    Hell Bomb said:
    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 Computer


 
Page 1 of 2 12 LastLast

  Related Discussions
Our Sites
Site Links
About 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 08:02.
Find Us