Forum Replies Created
-
AuthorPosts
-
dougModerator
Hi John –
Generally when you execute a script remotely on a target computer using BatchPatch, that script will only have access to resources on the target computer. The script will *not* have access network resources. This is why your script isn’t completing.
You *might* have luck if you explicitly supply credentials for the row in BatchPatch using ‘Actions > Specify alternate credentials’ Let me know if that works. It might, but it might not.
Assuming the above suggestion does not work, then the way to do this is successfully is to *not* rely on any network resources for the installations. You would need to write your script so that it does not include network locations and instead just includes the relative paths/locations. Then put all files in a single directory and use the BatchPatch ‘Deployment’ feature with the ‘Copy entire directory’ option.
There’s an example of this type of usage at the following link. Hopefully you can use this as a template/example to model your script/deployment:
Deploy Multiple MSU files in a single action
I hope this helps.
One other option that you might consider is to create a separate deployment in BatchPatch for each application that you want to install. Save each deployment in the BatchPatch deployment window. Once each deployment configuration has been saved you can then create a ‘Job Queue’ that installs each deployment that you previously created, sequentially. You can then also save that job queue for future use. This would give you a one-click way to install all the apps in a single action.
-Doug
January 28, 2015 at 5:11 pm in reply to: "Batchpatch.exe" 100% CPU usage during copy of "WsusScn2.cab" #10976dougModeratorThank you for making us aware of this issue. We are looking into it. I will report back here when I have more information.
For the time being it seems that limiting the concurrent file copies to just 1 will prevent this from happening. See ‘Tools > Settings > General > Concurrent File-Copy Operations Maximum.’ Setting this value to 1 should both prevent the CPU from pegging at 100% and also dramatically speed up the copy. The overall benefit should be positive, even though less concurrent copies are taking place.
Thanks,
Doug
dougModeratorMats – I tried to uninstall Notepad++ at the command line, using the syntax you provided, WITHOUT using BP. So, I launched a command prompt as administrator, and then I ran the following command:
WMIC product name="Notepad++" call uninstall /nointeractive
It did *not* uninstall Notepad++ and instead gave the following output:
ERROR:
Description = Invalid queryThat said, since I cannot uninstall Notepad++ *without* BP using the command you provided, I certainly do not expect to be able to uninstall Notepad++ *with* BP using that same invalid command. Before you ever try to use BP to perform a remote action, you should confirm that the syntax you want to use works when you’re at the command line *not* using BP.
To successfully uninstall Notepad++, use BatchPatch Remote Command 1/2 (Remote Command 3/4 will not work with this syntax), and enter the following line:
"C:Program FilesNotepad++uninstall.exe" /S
dougModeratorBooster – If you run BatchPatch as admin, then yes you will be able to self-update. If it is *not* launched as admin, the self-update will fail. However, in either case, the reboot will always fail. BatchPatch will never reboot the machine that it is running on.
-Doug
January 27, 2015 at 2:48 pm in reply to: "Update + reboot cycle": having the job step displayed in a column? #10987dougModeratorI corrected the title. 🙂
January 23, 2015 at 7:11 pm in reply to: Feature Request: uninstall Multiple (txt file list?) Windows Updates #10769dougModeratorThanks for the suggestion. We’ll consider this for a future build.
-Doug
January 22, 2015 at 4:44 pm in reply to: "Update + reboot cycle": having the job step displayed in a column? #10775dougModeratorOlivier – Thank you for the detailed explanation. Everything you said makes sense. The idea to show the job steps is very good, and we will plan to add it in a future build.
With regard to the VM reboot issue, I now understand what you are describing, but at the moment I’m not sure what we can do about this. For the time being, your solution of adding a 10 minute wait period is good. Your suggestion to maybe add a check for pending install/reboot makes sense, and we’ll look into it, but the problem is that there isn’t really a formal way to ask Windows if it is in the middle of doing a post reboot patch and if it’s about to reboot itself. In any case, we will look into this issue more to see if we can figure out a good way to address it. However, for now you should stick with your 10 minute wait step.
Thanks again,
Doug
January 21, 2015 at 4:07 pm in reply to: "Update + reboot cycle": having the job step displayed in a column? #10780dougModeratorbooster –
The actions are all printed in the ‘All Messages’ column as they are executed, so that you can tell what is happening. Is this not sufficient? What more is it that you are looking to see? Please be as detailed as possible in your description. The only way that we can update/improve the app based on your feedback is if you are very clear about what you would like to see that is not currently available/visible in the app.
When you say that you had problems with ‘Wait for host to go offline and come back online’ I’m not sure I understand. You’re saying that if the host reboots as part of the patch process itself, then BP tries the next job step while the host is offline. Under what circumstances does the host reboot without BP being responsible for initiating the reboot? I am not aware of such a thing to exist with Windows Update. When using BP, the row in BatchPatch should either say “Reboot Required” or “No reboot required,” but it sounds like you’re saying that you’re facing a situation where it is reporting “No reboot required” but it’s rebooting on its own without BP initiating the reboot? I have never experienced this behavior. Am I understanding correctly?
Thanks,
Doug
dougModeratorYes – At the very least we will def re-word it to be more clear so that it’s not just ‘create’ but also ‘edit’ or ‘modify.’
Thanks again,
Doug
dougModeratorThanks for the suggestion. You can currently modify remote and local commands directly from the Job Queue window, but to edit a deployment you have to go to the deployment window separately. We will add your suggestion to the list.
-Doug
dougModeratorHi martbasi –
We will consider adding functionality to a future build that enables exporting/importing job queue information. In the meantime, this info is saved in the following location:
HKCUSoftwareBatchPatchSavedUserDefinedJobQueues
-Doug
dougModeratorRemote Command 3 will work, yes.
-Doug
dougModeratorHugo – I’m not sure that this is really a question about BatchPatch so much as it’s a question about environment variables. I’m not an expert on environment variables.
BatchPatch can execute remote commands, as you know. So it’s just a question of finding the correct command to execute.
I did a quick google search on environment variables, and from what I found the “SET” command only sets current session variables. If you want to set a system variable you have to use “SETX” instead. It also says that updates made with SETX will only be visible to the next logon session, which essentially means that if you use BatchPatch to add/update a variable on ComputerX, then on ComputerX you will not see this change until/unless you logoff and log back on to ComputerX to verify it.
That said, in BatchPatch I simply highlighted my target host(s) and created a remote command with the following syntax:
SETX client myfqdn
I then executed the command in BatchPatch and it reported “Exit Code: 0 (SUCCESS).” So, I logged on to the remote system to verify it was there. On the remote system I opened a cmd prompt and typed “SET” and I could see the value that I set previously was visible.
-Doug
dougModeratorThat is a fantastic workaround that I wasn’t aware of! Thanks for mentioning it.
-Doug
dougModeratorHi Timma – Thank you for pointing this out. It’s not really a bug, but we will see if we can figure out a better way to handle it. The situation is that in the previous version the column was set to not wrap text. In the new version it is set to wrap text. The output of the command that you are using is in the format:
Model
<actual model name>
So, the way that it’s displaying now in the new version is technically correct. The old version was removing the wrap, which in the case of this particular command happens to be convenient because it allows you to see everything. For other outputs, however, it makes the formatting worse.
I think moving forward the best solution will be for us to provide a setting for the user to be able to enable/disable wrapping.
In the meantime, it looks like we left wrap=false for the ‘Remote Command Output Log’ column, so you can use that to get what you’re looking for until we release an update.
I hope this helps.
Thanks,
Doug
dougModeratorNo problem. Glad it’s working now.
Take care,
Doug
January 13, 2015 at 5:39 pm in reply to: Exclude "automatic" services that are suppose to be stopped? #10824dougModeratorThe current build of BatchPatch doesn’t allow you to exclude any services from this check, but I will add it to the to-do list for a future build.
Thanks,
Doug
dougModeratorHugo – There are a couple of possibilities here:
1. Make sure that BatchPatch is instructing computers to search the same WSUS server that is generating your reports. If BatchPatch is configured to have computers search for updates on Windows Update or Microsoft Update instead of your own WSUS server, then you might end up with different updates installed than what is approved on your WSUS.
2. Sometimes after installing updates and rebooting, a new update will become available for a computer. This has nothing to do with BatchPatch per se. It’s something that can occur when you use the regular Windows Update interface or BatchPatch or any update installation mechanism. For this reason, some users always build into their update process a second check for updates after reboot. In fact, BatchPatch even has a “Update + Reboot Cycle” option on the ‘Windows Update’ section so that you can have it cycle through as many times as you want. You could also use the ‘Job Queue’ for this.
I hope this helps.
-Doug
dougModeratorIn order to populate the description field you need to first check the box that says “Import description field” before you click “Add to grid” when importing hosts from AD. This box is visible under the “Add-to-grid options” of the ‘Add hosts from directory’ window.
-Doug
dougModeratorExcellent. I’m glad that worked. Keep your eye out for the new release in the coming days. It’s great to hear that the app is working well for you! Thank you for the kind words.
Take care,
Doug
dougModeratorWiseguy – The current version of BatchPatch allows you to execute a job queue in the following way:
1. Create a job queue for a given row or rows and then select the “apply queue to row(s) without executing” button. This will apply the specified job queue settings to a particular set of rows that you have selected.
2. Then go ahead and schedule a task for those same rows using “Execute job queue” as the task option.
In the next version of BatchPatch (should be released within a few weeks or so), you will be able to use the task scheduler to not only execute the job queue that is applied to the row(s), but you will also be able to execute previously saved job queues. (the current version does not support executing previously saved queues)
Thanks,
Doug
dougModeratorScott – Thanks for testing.
I understand that you can make manual PsExec connections. PsExec is not the source of the problem here. The issue is actually WMI on those target computers. The reason I had you run
WMIC PATH Win32_ComputerSystem GET name
is because I wanted to see what would happen when running a direct WMI query on those machines. When BatchPatch runs “Get host name” is uses WMI but it does it remotely (not using PsExec). The WMIC command, however, gets run locally on the target through the use of PsExec. The fact that it returns -2147467262 (the same error as the original “Get host name” action in BatchPatch) indicates that WMI is the source of the problem. -2147467262 translates to “No such interface” and explains why we then see “Specified cast is not valid” because the WMI query is returning empty, and then BatchPatch fails to cast the retrieved object to the host name string because the object is empty. If you were curious you could take that same WMIC command from above and run it in a command prompt manually on one of the problematic machines. You’ll see that it returns an error, indicating the WMI is the source of the problem.All that said, this is not a BatchPatch issue. It’s an issue with WMI. Normally I would recommend simply restarting the WMI service on the target computers. However, since you said a reboot didn’t fix the issue, then a service start certainly isn’t going to do it. I wonder if perhaps a Windows Update you installed (or some other type of update) caused WMI corruption on those targets. Your next step should be to look into repairing WMI. Take a look at the following links as a starting point:
dougModeratorHi Scott –
What version of BatchPatch are you using?
What OS are the target computers?
Do other “Get information” queries work in BatchPatch without the error?
What happens if you run the following command under “Remote Command (logged output)”
WMIC PATH Win32_ComputerSystem GET name
Thanks,
Doug
December 16, 2014 at 3:15 pm in reply to: Knowing when a server is back from a windows update reboot beyond ping #10960dougModeratorOK great. We will also consider the possibility of extending the regular ping monitoring to include a more thorough online check option.
-Doug
December 15, 2014 at 7:43 pm in reply to: Knowing when a server is back from a windows update reboot beyond ping #10955dougModeratorIn the latest version of BatchPatch released 2014-12-09 the ‘Job Queue’ has an item called “Wait for host to go offline and come back online,” which uses a WMI check to see if the server is responding to connection attempts. Does this work for you?
When you say that BatchPatch deems it to be back up and running by responding to ping, in what area of the software are you referring to? I’m not saying that you are incorrect, but if you could be more specific of exactly what you are trying to accomplish, it would help me understand if/where a change needs to be made. Are you just referring to when BatchPatch prints “server ONLINE” in the ‘All messages’ column? Or is there something else that you’re referring to?
Thanks,
Doug
December 12, 2014 at 12:58 pm in reply to: Windows Update/Remove individual update (requires KB ID) #10914dougModeratorHello Mattias – In order to prevent the computer from seeing the update as available for installation you must decline the update in WSUS. If you are saying that you already declined it in WSUS but it’s still appearing as available on the target computer then I would question if the search for updates is actually taking place against the WSUS server. In BatchPatch under ‘Tools > Settings > Windows Update’ make sure that the ‘Server Selection’ is set to ‘Default / Managed’ and not ‘Windows Update’ or ‘Microsoft Update.’ Also, verify the configuration of the target machine to confirm it’s pointing at your WSUS server. You can use the ‘Actions > Windows Update > Get Windows Update config’ option in BatchPatch to confirm. If you’re still seeing the update on the computer then I’m not sure why, but it’s not related to BatchPatch. BatchPatch simply reports the updates that the computer shows as available. If BatchPatch is showing that update, then if you launch the Windows Update interface directly on the machine it will also show the update if it’s searching the same update server.
In any case, another option is to “hide” the update either using the Windows Update interface or using BatchPatch. If you choose to hide it with BatchPatch it will still be available to the computer but will no longer appear anywhere until/unless you later unhide it. The hide/unhide option is equivalent to launching the Windows Update interface on the target computer and right clicking on the update and choosing “hide update.”
-Doug
December 11, 2014 at 10:37 pm in reply to: Scheduling Batchpatch to run on specific weekend of the month #10913dougModeratorNewman – Currently if you select a recurring monthly schedule, it will select a date that is exactly one month in the future, with no regard to whether it’s a weekday or weekend. We are hoping/planning to add more advanced scheduler functionality in a future build, but for the moment what you see is what you get. Sorry about that.
-Doug
dougModeratorHi Andy – There is not currently a menu item to export the visible grid to CSV, though we plan to add one. However, in the meantime you can accomplish the same thing using copy/paste. Highlight the grid and use CTRL-C to copy it, and then you can paste it directly to an Excel sheet.
I hope this helps.
-Doug
dougModeratorHi Hugo –
BatchPatch uses a combination of WMI and PsExec.
In order for PsExec to work on a target machine, the target machine has to have File and Printer sharing enabled, and ports 135 and 445 need to be open. You’ll need to make sure that the computer running BatchPatch is able to connect to the \targetComputeradmin$ share on the target computer.
For WMI if the firewall is a Windows Firewall, then you simply need to follow the instructions outlined here: Using BatchPatch With Windows Firewall
However, if it’s not a Windows Firewall, then it can be more complicated because WMI uses dynamic ports. While it is possible to set WMI to use a static port, this could be labor-intensive, and we have not tested BatchPatch under these conditions.
WMI Static Port configuration:
http://msdn.microsoft.com/en-us/library/windows/desktop/bb219447%28v=vs.85%29.aspx
DCERPC:
However, many firewalls have implemented DCE/RPC, which solves this problem and allows the use of dynamic ports for WMI/RPC:
dougModeratorGreat! I don’t know why it hadn’t occurred to me before, but I guess the issue with the .bat file was that the plink.exe needed the full c:tempplink.exe filepath inside the .bat. I’m really glad to hear that it’s working now!
-Doug
-
AuthorPosts