BatchPatch Forums Home › Forums › BatchPatch Support Forum › Cannot Execute
- This topic has 3 replies, 2 voices, and was last updated 5 years, 1 month ago by doug.
-
AuthorPosts
-
November 13, 2019 at 2:36 am #12119gemini.rajeshParticipant
For some reason certain commands does not work on few remote computers.
E.G my computer name is GC137, I’m running batchpatch from a machine which is logged in with an domain admin account which is inturn admin for GC137 too.
When I run ->Get information -> Get list of installed programs – it shows me the output.
But when I use a custom command, it does not work. It stays in executing state and does not move from that.Get Information Output Log
Executing \\GC137 -s wmic product where “Name like ‘%SOLIDWORKS eDrawings 2019 SP04%'” get Name
All Messages
Mi-08:30:06> Get Information Executing \\GC137 -s wmic product where “Name like ‘%SOLIDWORKS eDrawings 2019 SP04%'” get Name
Mi-08:30:06> Get Information: Establishing connection…
Mi-08:30:05> Get Information: Queued…
—————————————————————————————————-November 13, 2019 at 11:52 am #12124dougModeratorWhen in doubt you should execute the command directly at the command prompt of the target computer rather than through BatchPatch. This would help you determine if the issue is with the command or the issue is somehow being introduced by executing through BatchPatch. In this case your command syntax looks correct to me. However, note the following warning, which I suspect is part of your issue here, from https://docs.microsoft.com/en-us/previous-versions/windows/desktop/legacy/aa394378(v%3Dvs.85)
Warning Win32_Product is not query optimized. Queries such as “select * from Win32_Product where (name like ‘Sniffer%’)” require WMI to use the MSI provider to enumerate all of the installed products and then parse the full list sequentially to handle the “where” clause. This process also initiates a consistency check of packages installed, verifying and repairing the install. With an account with only user privileges, as the user account may not have access to quite a few locations, may cause delay in application launch and an event 11708 stating an installation failure. For more information, see KB Article 794524.
November 14, 2019 at 9:08 pm #12130gemini.rajeshParticipantHi Doug…
I’m able to retrieve the list of installed program from the very same computer by using the BatchPatch’s default option “Get Information – Get list of Installed programs
But it is these custom queries that don’t run.
November 14, 2019 at 9:51 pm #12131dougModeratorBatchPatch does not use Win32_Product, so it cannot be compared to your custom query. They are two completely different things. As I mentioned above, if you have problems running a query through BP, the first thing to do is try the query directly on the target computer at the command prompt *without* using BP. This is very simple to test. I’m confident that your issue is related to the snippet I posted above about Win32_Product doing quite a lot behind the scenes. For this reason you will find *lots* of people on the internet describing why they never use it. My recommendation to you is to not use Win32_Product.
-
AuthorPosts
- You must be logged in to reply to this topic.