doug

Forum Replies Created

Viewing 30 posts - 1,711 through 1,740 (of 1,980 total)
  • Author
    Posts
  • in reply to: Specified Cast is not Valid #10968
    doug
    Moderator

    Scott – 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:

    https://social.technet.microsoft.com/Forums/windows/en-US/8ed26d46-9994-4052-a307-5b071805aea8/wmi-corrupt-how-to-reinstallrepair

    http://technet.microsoft.com/en-us/library/ff404265.aspx

    in reply to: Specified Cast is not Valid #10961
    doug
    Moderator

    Hi 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

    doug
    Moderator

    OK great. We will also consider the possibility of extending the regular ping monitoring to include a more thorough online check option.

    -Doug

    doug
    Moderator

    In 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

    in reply to: Windows Update/Remove individual update (requires KB ID) #10914
    doug
    Moderator

    Hello 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

    in reply to: Scheduling Batchpatch to run on specific weekend of the month #10913
    doug
    Moderator

    Newman – 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

    in reply to: Export grid to CSV? #10904
    doug
    Moderator

    Hi 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

    in reply to: Port needed #10864
    doug
    Moderator

    Hi 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:

    https://en.wikipedia.org/wiki/DCE/RPC

    http://wiki.wireshark.org/DCE/RPC

    in reply to: Run bat file rebooting #10855
    doug
    Moderator

    Great! 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

    in reply to: Run bat file rebooting #10853
    doug
    Moderator

    That’s progress, at least. Not sure why it’s failing though. What happens if you simply put the plink.exe command directly into the local command 1 *instead* of using the .bat file:

    plink.exe g1vpnag01 -pw mnbJHG_7tT ./g1vplncarc02off.sh

    By the way, what happened when you tested a batch file that only contained “ipconfig” without the quotes? That worked, I assume, when you used the following syntax?:

    C:WindowsSystem32cmd.exe /C c:tempipconfig_test.bat

    -Doug

    in reply to: Run bat file rebooting #10851
    doug
    Moderator

    What version of BatchPatch are you running? This is peculiar.

    With regard to the “Cannot start process because a file name has not been provided” message, it should (in theory) know to execute using the shell, but for some reason it’s not doing that on your machine. I wonder if that might be due to an environment variable setting, and I wonder if a missing environment variable is also the cause for the other issue we’re experiencing. I will look into that more, but for the moment if let’s scratch the plan I suggested before to not use cmd.exe. Instead let’s use the cmd.exe command syntax:

    cmd.exe /C c:tempg1vplncarc02-off.bat

    Please give that a try. If it doesn’t work, please try:

    C:WindowsSystem32cmd.exe /C c:tempg1vplncarc02-off.bat

    Let’s see what happens now. Again please monitor the task manager and see if plink.exe appears.

    Thanks,

    Doug

    in reply to: Run bat file rebooting #10849
    doug
    Moderator

    John – A couple points…

    1. A batch file (.cmd or .bat) generally should be executed with cmd.exe, not powershell.exe and not cscript.exe. In BatchPatch when you execute a .bat/.cmd via local command, just enter the path to the batch file. In theory, the powershell.exe ought to be able to run a .bat file without issues, but since you’re having problems, please try removing it as it’s not necessary and it’s slightly abnormal (cmd.exe would be more appropriate, but it’s also not necessary), and perhaps it is part of the problem. So, the syntax in your case for the local command should just be set to:

    c:tempg1vplncarc02-off.bat

    2. Since in your case the batch file is executing plink.exe, please open task manager and watch the processes list for plink.exe when the local command is executing. If plink.exe appears, then we’ll know that it’s being executed. If it doesn’t appear, then we’ll know it’s somehow stuck before it even executes.

    I just did several tests running batch files as described above using local command, and they all worked properly. However, of course none of them execute plink.exe, so it’s possible that the problem is somehow tied to that, but realistically it *should* work just fine.

    I know you said you tested a batch file containing “pause” but that’s the one thing that you should NOT test because it will “pause” indefinitely and produce exactly the behavior that we are trying to avoid. Instead, test something like “ipconfig” (without the quotes, of course) inside of the batch file. That would be a much better test and it should return the ip configuration of the machine to the Local Command Output Log column.

    Keep me posted.

    -Doug

    in reply to: Run bat file rebooting #10846
    doug
    Moderator

    Thanks, John.

    So, when you run the script manually at the command line (without BatchPatch) it (plink) doesn’t prompt for any input such as a username or password? When BatchPatch runs a local command, it should in theory be identical to running a command at the command line with just one exception, which is that it runs hidden and doesn’t allow user interaction. That said, if your script doesn’t normally prompt for any input yet BatchPatch still hangs on the local command, indefinitely, then the only other thing I can think of that might cause that is if the script requires elevation to run the plink.exe. What happens if you run the entire BatchPatch instance with elevation (right-click on the BatchPatch.exe and choose to run as administrator). Does this solve the problem? Also note, you can test the local command directly without running the job queue by simply choosing ‘Actions > Execute Local Process/Command > Execute Local Command 1’

    Let me know how it goes.

    -Doug

    in reply to: Run bat file rebooting #10844
    doug
    Moderator

    John – What are the contents of the .bat file? Can you post here? I should then be able to help you get this worked out.

    Generally speaking if a local or remote command is hanging indefinitely it’s because it’s waiting for user input of some kind. However, when BatchPatch executes these commands they are hidden and cannot accept user input. I’m not sure if your script is expecting user input of some kind, but if it is then that’s where your problem is. If not, then I’m not sure what’s going on and would then like to see the actual script contents.

    Thanks,

    -Doug

    in reply to: Run bat file rebooting #10841
    doug
    Moderator

    Hi John –

    Yes you can do this using the ‘Job Queue.’

    You would need to create a ‘Local Command 1’ and a ‘Local Command 2’ for a given row (or rows). Local Command 1 would execute the batch file that disables alerts for $computer, and Local Command 2 would execute the batch file that enables alerts for $computer. Note that inside the ‘Local Command’ window you are able to specify $computer as a variable to pass into your script, assuming your script is setup to receive the computer name as a parameter. When $computer is specified in a BatchPatch Local Command, BatchPatch will then substitute the computer name from the ‘Hosts’ column in place of $computer. This means that can use the same Local Command for every row instead of having to customize the command in each row with each row’s computer name.

    Once you have Local Commands 1 and 2 setup for your row(s), you would then create a Job Queue for the row(s) that looks something like:

    Execute Local Command 1

    Download/Install Windows Updates + Reboot

    Wait 10 minutes

    Execute Local Command 2

    I hope this helps.

    Here is a video demo of the Job Queue: https://www.youtube.com/watch?v=JwxhgprfZ5Y

    Here is a tutorial that uses $computer in a Local Command: Using BatchPatch to Execute a Custom Script to Retrieve the Count of CPU Sockets, Cores, and Logical Processors from Remote Computers

    Note, we have a handful of improvements to the job queue coming soon, and so the process that you are setting up here will be even easier once those updates have been published. However, in the meantime you can still do what you want pretty easily.

    -Doug

    in reply to: Generate Update History #10749
    doug
    Moderator

    I’ve emailed you directly to troubleshoot. I’ll post an update here in the forum after we figure out what’s going on.

    -Doug

    in reply to: Error Code 2359302 #10748
    doug
    Moderator

    constahannor – In order for me to provide the best possible help, it would be great if you could provide more information. Please describe in detail exactly what you are doing in BatchPatch to produce this error. Furthermore, please provide the entire/complete error message (not just the code) that is displayed.

    That said, most error codes of this kind are reported by Windows, not by BatchPatch (BatchPatch simply displays the error code that Windows generated). And when I convert this error to HEX it’s 240006. Looking up 240006 on Microsoft’s error code list (https://support.microsoft.com/kb/938205) says:

    0x00240006L WU_S_ALREADY_INSTALLED The update to be installed is already installed on the system.

    That said, without knowing any more detail about what you are actually doing, my best guess for what probably happened is that you used WUSA.exe to install an update that is already installed on the target system, and that is why you received the 2359302 error.

    -Doug

    doug
    Moderator

    No problem, Vince. I’m happy to hear that works! Very strange.

    Even though it’s unclear why/how this happens, we actually have some ideas on preventing this problem from being able to occur in the first place, which we expect to add in a future build.

    Thanks,

    Doug

    doug
    Moderator

    Vince – I’m at a loss here. I don’t understand what could possibly cause this to happen, and it doesn’t make any sense that it occurs on only some targets when using BP but not other targets. And then it also makes no sense that it doesn’t occur when running psexec from the command line against the targets that produce the error in BP.

    What happens when you execute Remote Command 3/4 instead of 1/2 ? Any differences?

    Can you confirm that PsExec is in your Windows PATH environment variable? As a test, please also try putting a copy of PsExec in the same directory as the BatchPatch.exe. Let me know if that has any impact.

    Thanks,

    Doug

    doug
    Moderator

    Vince – this is very odd. What happens if you try to use psexec manually from the command line?

    Launch a cmd on the BP computer and type the following command, where targetComputer is one of the computers that you’re getting the “Error: Cannot start process because a file name has not been provided.”

    psexec \targetComputer gpupdate.exe /force

    in reply to: Question on scheduler #10666
    doug
    Moderator

    The application needs to be running in order for the scheduled tasks to be executed, so no it will not work if there are no users logged on. You can minimize the app to the system tray to get it out of the way by right clicking on the minimize button.

    doug
    Moderator

    Thanks, Travis. I totally hear your frustration on this one and agree that proper date sort would be nice. From a technical perspective I think we looked at this before and ran into an unexpected problem with the implementation and so we put it on-hold. However, we do still plan to get it implemented in a future build.

    -Doug

    in reply to: Feature Request: Export Just Hosts #10654
    doug
    Moderator

    OK, sounds good. I’ll keep my eye out for it.

    Thanks,

    Doug

    in reply to: Feature Request: Export Just Hosts #10652
    doug
    Moderator

    Thanks for the suggestion, Travis. We’ll put this on the list this for a future build. In the meantime, one other way to easily get this information without having to do a find/replace is to simply highlight the entire grid and use ctrl-c to copy and paste it into a spreadsheet application like Excel. From there you can just highlight the hosts column and do with it as you please. I know this is also an extra step, but it might be easier than dealing with the find/replace.

    Thanks,

    Doug

    doug
    Moderator

    Vince – This is peculiar. I’m not sure what to make of it, and I can’t quite decipher what you are describing.

    Are you saying that the error is related to where BatchPatch.exe runs? Or are you saying that the error is related to specific target computers that have been added to a BatchPatch grid, regardless of what computer runs BatchPatch.exe?

    Thanks,

    Doug

    in reply to: updates/no updates #11613
    doug
    Moderator

    Turns out this was happening when there were available updates appearing in the check for available updates, but then the when the download process was initiated the updates were failing to download, so when it came time for installation there were no downloaded updates to install. The problem was an issue with particular updates, and they could not be downloaded by the Windows Update client on the machine. It was not an issue with BatchPatch.

    in reply to: Firewall problems. #11612
    doug
    Moderator

    Johnny – In order for BatchPatch to work, the Windows Firewall must allow RPC communication, which is required for WMI to work. Additionally, you must allow File and Printer sharing. This is described in more detail on the following page:

    Using BatchPatch With Windows Firewall

    There is also some additional helpful info here:

    Batchpatch Ports For Enterprise Firewall ACLs

    With regard to authentication, you’ll also want to make sure that you look at this link too:

    BatchPatch Authentication In Domains And Non Domain Workgroups

    in reply to: Error: 2. HRESULT: -2147024894. Could not find file … #11611
    doug
    Moderator

    twoj – Thanks for reporting all of your findings. This is very helpful.

    A couple of quick notes:

    1. PaExec is not based on PsExec code. This doesn’t mean that they can’t have the same problems since they both accomplish the same task in the same or similar ways. However, PsExec source code is not available, and so PaExec code could not be based off of the PsExec code. However, PaExec was definitely written to mimic PsExec functionality, though the code itself is different.

    2. We had one other report recently of the same “Error: 2. HRESULT: -2147024894” from a different user on a single Win 2012 (non-R2) target, while running BatchPatch on Win 8.1. Interestingly he switched from v2.11 to v1.98 and then the error disappeared. BUT… then he switched back to v2.11 right after that, and the problem never occurred again. Go figure. I do not know what to make of this behavior at the moment.

    3. Unfortunately we are still not able to reproduce this error on any combination of source and target operating systems.

    in reply to: updates/no updates #11610
    doug
    Moderator

    Hi John – This sounds very odd. I am going to email you so that we can iterate more easily to get to the bottom of what is happening.

    -Doug

    doug
    Moderator

    I understand what you’re saying. That issue occurs because of the “Tools > Settings > Remember open tabs…” settings being enabled. So, another workaround would be to just disable the “Remember tabs” checkboxes. But we’ll still get it fixed regardless.

    Thanks again,

    Doug

Viewing 30 posts - 1,711 through 1,740 (of 1,980 total)