BatchPatch Forums Home › Forums › BatchPatch Support Forum › Some processes stuck on executing
- This topic has 7 replies, 2 voices, and was last updated 6 years, 8 months ago by doug.
-
AuthorPosts
-
March 8, 2018 at 5:28 pm #8858brad.pfeiferParticipant
I’ve just downloaded batchpatch and I’m doing a demo to see how it works on our network.
Currently I’ve tried to send messages to remote users, kick off windows update etc.
Informational queries work, I can view services, who’s logged in etc.. If I try to perform any actions such as start a service, kick off updates, shutdown, reboot, it will be stuck on execution. The client has been installed on the target computer without issue.
I’m also running this as a domain administrator and am using the same credentials on the target machines. The admin share is accessible on the target machine with the admin account being used.
March 8, 2018 at 5:55 pm #10183dougModeratorBrad – This sounds like a Windows ‘Open File – Security Warning’ issue for psexec.exe. When you first download and run psexec or any exe from the web, Windows usually prompts you to click “OK” or “Yes” or “Run” to confirm that you want to run the exe. In that window there should also be an option “Don’t prompt again” or “Always ask before opening this file” similar. I suspect that somehow this prompt is waiting for input from you but you are not seeing it. Are you launching BatchPatch with run-as to run it as a different account than the account that you are logged on to the computer with? Or are you simply double-clicking the batchpatch.exe to run it as the same account that you are logged on to the computer with? In either case I would suggest that you run psexec at the command prompt and make sure you have it running/working first. Make sure that on any prompt that appears that you select or deselect the checkbox (depending on how the checkbox text reads) so that subsequent attempts to run the .exe do not trigger the prompt to appear. I *think* the prompt in this case will say “Always ask before opening this file” and so you would need to deselect the checkbox if that is how it reads.
FYI there is no client to install on target systems, so I’m not sure what you are referring to there.
Let me know how it goes.
Thanks,
Doug
March 8, 2018 at 6:19 pm #10174brad.pfeiferParticipantHey Doug, thanks for the quick reply.
I do have psexec copied to the right location, I did run it through cmd and got the list of different variables (The normal prompt when you run psexec in cmd).
I’m running BatchPatch using a domain administrator account. Whenever I try to pull any logs from a target machine, it will hang as well if that adds an information. It kind of feels like I’m missing something really simple, but I’m not seeing it. If there’s any logs that I could pull or generate let me know.
As for that client I was mentioning it’s called BatchPatchRemoteAgent, it’s under C:Program FilesBatchPatch
March 8, 2018 at 6:55 pm #10175dougModeratorBrad – You didn’t answer the question about running BatchPatch with run-as or not. I know that you are running BP using a domain admin account, but what I don’t know is are you logged on to the BP computer as that domain admin account and then launching batchpatch.exe by simply double-clicking, or are you logged on to the BP computer as some other account and then launching the batchpatch.exe by right-click run-as and then entering the domain admin account credentials so that BP runs as a domain admin account while being logged on to the computer as a different account?
Another question…
In your original posting you said that reboot and shutdown commands do not work. I’d like to confirm if this is actually true because most of the built-in reboot command in BP use only WMI and do not use PsExec. However, the issue you are describing sounds like something is getting hung up with PsExec not WMI. Could you please try ‘Actions > Reboot > Reboot (force, if required)’ and let me know if it works or not? Or better yet, maybe you could just paste the contents of the ‘All messages’ column to demonstrate which actions you are testing successfully and which actions are hanging/failing.
The issue that you are describing does indeed sound like we are missing something very simple, and it still sounds to me like the behavior that we would expect if the ‘open file – security warning’ were waiting for input. One other possibility is that some type of security software like anti-virus or HIPS on the target (or on the BP computer) could be blocking things. I’d like to have you follow the instructions in the troubleshooting guide under ‘Windows Update Actions’ and let me know what you discover.
Also please try under ‘Tools > Settings > Remote Execution > Use psexec -r switch’ to specify a custom remote service name. You can put something like ‘BatchPatchExeSvc’ in that box. See if it makes any difference. This setting can sometimes help bypass security software that is specifically blocking psexesvc.exe from running on the target.
-Doug
March 8, 2018 at 8:38 pm #10176brad.pfeiferParticipantDoug, sorry for not clarifying that. I’m logged in to the computer as a regular domain user, I’m right clicking and using run as admin then using a domain admin account to start BatchPatch.
Correct, so I tried reboot(Force, if required), it looks like it ran, because it gave me a timestamp for a message instead of an error. However the machine did not reboot. I also tried the reboot (shutdown.exe /r /f /t 0), that one is hanging like windows updates does.
This is the ‘All Messages’ section for the machine I attempted the reboot on. I tried to initiate an abort as well but it was hung up as well.
Thu-14:23:46> Remote Command: Executing \compname -s shutdown.exe /a
Thu-14:23:46> Remote Command: Establishing connection…
Thu-14:23:07> Remote Command: Executing \compname -s shutdown.exe /r /f /t 0
Thu-14:23:07> Remote Command: Establishing connection…
This is for another machine that I’m trying to run windows updates on.
Thu-14:27:12> Remote Command (logged output): Executing \bradp -s NET STOP “dbupdate”
Thu-14:27:12> Remote Command (logged output): Establishing connection…
Thu-14:27:12> Remote Command: Executing restart service macro…
Thu-14:27:12> Remote Command: Queued…
Thu-14:26:07> Remote Command: Executing \compname -s MSG * “test”
Thu-14:26:07> Remote Command: Establishing connection…
Thu-14:17:11> Windows Update: Attempting to initiate Windows Update (Action: Search for updates: ‘ImportantAndRecommended’ | Server selection: Microsoft Update) …
Thu-14:17:11> Windows Update: Establishing connection…
Thu-14:17:11> Windows Update: Initializing…
Thu-14:17:11> Windows Update: Queued… (Check for available updates)
I can test more functions if you would like. They all seem to stop at around the same point, the ‘execution’ portion.
Right before I posted this I actually tested out the services management portion. I attempted to stop a service (dbupdate), and it got hung up as well. However when I run another command after that (get stopped automatic services) it ended up completing the stop service command at the same time as listing the stopped services. It worked, but didn’t mention it in the message log.
Thu-14:28:35> Get stopped automatic services: 9 stopped automatic service(s):
Dropbox Update Service (dbupdate) (Stopped)
DigitalPersona Authentication Service (Stopped)
Group Policy Client (Stopped)
Google Update Service (gupdate) (Stopped)
Downloaded Maps Manager (Stopped)
OpenVPN Interactive Service (Stopped)
Remote Registry (Stopped)
Software Protection (Stopped)
Windows Biometric Service (Stopped)
Thu-14:28:35> Get stopped automatic services: Attempting to retrieve services info…
Thu-14:27:12> Remote Command (logged output): Executing \bradp -s NET STOP “dbupdate”
Thu-14:27:12> Remote Command (logged output): Establishing connection…
Thu-14:27:12> Remote Command: Executing restart service macro…
I’ll take a look at the link and also try out that setting you mentioned for psexec and let you know how it turns out. I’ll take a closer look at our antivirus as well!
Thank you so much for all your help and quick replies.
March 8, 2018 at 8:50 pm #10172dougModeratorThanks for confirming. I think the issue must be related to psexec. The actions that you’re executing successfully all do not use psexec. The ones that are getting stuck all use psexec, and they all appear to be getting stuck right when psexec is triggered. The reason I asked about whether or not you were using run-as to launch the app is because I think maybe when using run-as there is something different occurring with how Windows handles the ‘open file – security warning.’ I would suggest for the sake of testing to try logging on to the computer with the account that you are launching BP as, then just launch BP by doubleclicking, rather than using run-as. Or if you log on to the computer as your normal user account and run BP by doubleclicking as your normal user account and then once BP is running enter the domain admin credentials on a per-row basis in the ‘alternate credentials’ field in the BP grid. This is explained more here.
Once you get things working it shouldn’t matter which of these three options you use, but for the sake of troubleshooting I wonder if the run-as could be preventing us from seeing a security file warning dialog, perhaps.
Otherwise please do continue reviewing the troubleshooting guide and your AV/HIPS software too. Let me know how it goes.
Thanks,
Doug
March 8, 2018 at 10:32 pm #10173brad.pfeiferParticipantHey Doug,
Just wanted to follow up with you on this, we did in fact get it working, the fix was changing the psexec remote service name.
This program is absolutely brilliant once it’s working. I’ve been patching some workstations, about to do a test server now, but so far no issues at all except my DA account was locked out randomly.
Thank you so much for the support, once I confirm it works on our servers, I’m going to purchase a license.
Thanks,
Brad
March 8, 2018 at 10:39 pm #10171dougModeratorExcellent. I’m glad you got it working, and I’m happy to hear that you like the tool!
-Doug
-
AuthorPosts
- You must be logged in to reply to this topic.