BatchPatch Forums Home › Forums › BatchPatch Support Forum › Unable to trigger SCCM commands unless user logged on
- This topic has 3 replies, 2 voices, and was last updated 7 years ago by doug.
-
AuthorPosts
-
April 20, 2018 at 4:03 pm #10545dougModerator
Hi Kevin – In BatchPatch under ‘Tools > SCCM client triggers’ all of the WMIC commands are hardcoded. You can see the complete list here: Triggering ConfigMgr (SCCM) Client Actions Remotely
They’re WMIC commands just like the ones that you are already executing, so I wouldn’t expect them to produce a different result than what you’re currently seeing unless you use a different trigger (there are a total of 49, if I’m remembering correctly). The only thing I would note is that according to any documentation I have seen, the two commands that you are executing are:
{00000000-0000-0000-0000-000000000001} Hardware Inventory
{00000000-0000-0000-0000-000000000121} Application manager policy action
not:
Machine Policy Retrieval Cycle
Application Deployment Evaluation Cycle
I don’t know if this means that you are really wanting to execute different commands, or if you are executing the correct commands, but in either case I don’t think you’re dealing with a BatchPatch problem, as it’s essentially just the messenger delivering the command. The command is clearly being executed. We know this not only because of the ‘SUCCESS’ response but because when the user logs on the deployment starts. So I think the real question is why does this SCCM trigger not do anything until the user logs on. I don’t know if this is something that could be answered by a SCCM guru somewhere or if there is a different client trigger that would do what you need/want. However, from the BatchPatch angle I don’t think there is anything else we can do.
April 22, 2018 at 11:32 pm #10571Kevin HylandParticipantHi Doug
The two triggers are the same – I took the name from the Configuration Manager on the remote computers but the WMIC is the same string.
I’m not sure why the SCCM is not deploying until the user logs on as its a per machine installation and if I leave it long enough it does install on its own before the user logs on. Its not my deployment package but I’ll try pulling it apart later.
In the meantime, is there a BP trigger for when a user logs on? If there is I can change the script to continue once the user logs on, lock out Outlook, force the SCCM triggers and then deploy the patches.
Thank you
Kevin
April 23, 2018 at 1:39 am #10575dougModeratorBP doesn’t have a trigger for when a user logs on, but you could incorporate that kind of a check into your script if you really wanted. The easiest way would be to use the Win32_Process class to search for running instances of explorer.exe. Generally you would only have an explorer.exe process running if a user is logged-on. If the script doesn’t find it then it can wait a minute and check again.
Here are a few examples of script integration into BP:
advanced-script-integration-with-batchpatch
advanced-script-integration-with-batchpatch-part-2
batchpatch-custom-script-integration-install-windows-updates-only-after-stopping-a-specified-service
Another option would be to perform the deployment through BP instead of through SCCM. Then you wouldn’t have the issue of the command not executing at the desired time. A BP deployment would execute at the time you choose to execute it.
-Doug
-
AuthorPosts
- You must be logged in to reply to this topic.