Support Forum: Get Support for Patch My PC Products and Services

Home Updater (Free Updater) => General Questions (Free Home Updater) => Topic started by: Kelemvor on February 15, 2018, 09:14:37 AM

Title: Scheduled Task via Group Policy - Not sure if it's working
Post by: Kelemvor on February 15, 2018, 09:14:37 AM
Howdy,

I'm testing creating a Scheduled Task to run PatchMyPc on a Windows 10 machine.  The only way I could get the scheduled task to show up was to set it to run as NT Authority/System when it runs.  (Apparently that's a Windows 10 thing).

Anyway, I got the task to show up and I ran it manually.  It shows up in Task Manager as running as System, but I can't tell if it's doing anything or not.  Anyone know where the log file might be when running under the System account?  It's been in my Task Manager for over an hour but doesn't seem to actually be doing thing so I'm just trying to get this figured out.

Or does anyone have any other suggestions on how to set this up from within a GPO?

Thanks.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: danvega on February 15, 2018, 11:05:28 AM
Running Patch My PC as a scheduled task is not working. I've tried many times and test on multiple systems. PMP launches under system but then it never does anything and eventually times out. I haven't been able to get it to work as a scheduled task
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Kelemvor on February 15, 2018, 12:17:54 PM
I was able to get it to work if I set it up under User configuration instead of Computer configuration.  However, we have some machines that we don't necessarily want it to run on so I'm told I can look into Loopback Processing within Group Policy to maybe gain some finer controls...
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Justin Chalfant (Patch My PC) on February 15, 2018, 06:01:14 PM
Quote from: Kelemvor on February 15, 2018, 12:17:54 PM
I was able to get it to work if I set it up under User configuration instead of Computer configuration.  However, we have some machines that we don't necessarily want it to run on so I'm told I can look into Loopback Processing within Group Policy to maybe gain some finer controls...

We found a bug when running under SYSTEM context. This will be fixed in V 4.0 that will likely be out next week.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Kelemvor on February 15, 2018, 09:55:34 PM
Thanks for the response.  If you think to reply here when the new version is out, that'd be great.  I'll give it a try right away.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Justin Chalfant (Patch My PC) on February 16, 2018, 12:24:37 AM
Quote from: Kelemvor on February 15, 2018, 09:55:34 PM
Thanks for the response.  If you think to reply here when the new version is out, that'd be great.  I'll give it a try right away.

You could try the latest beta if you want.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Kelemvor on February 16, 2018, 08:15:09 AM
Quote from: Admin - Justin on February 16, 2018, 12:24:37 AM
You could try the latest beta if you want.

Just installed the Beta ad am giving it a whirl.  Can you tell me where the log file would be stored if it's running as the "System" user?  Also, does the log file get updated as it runs so I can follow along and see if it's doing anything, or does it only get updated when it's done?

Thanks.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Justin Chalfant (Patch My PC) on February 16, 2018, 09:39:01 AM
It should be in the same folder as PatchMyPC.exe now. Yes it does log as it runs now this was an improvement in V4
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Kelemvor on February 16, 2018, 10:37:51 AM
We are testing to run it from a shared drive using the caching option.  It'd be great if we could specify to have the log file get stored on each PC somewhere instead of putting it in the folder with the EXE since that would probably make for an ugly mess if multiple people run it at the same time.

Thanks
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Justin Chalfant (Patch My PC) on February 16, 2018, 11:16:41 AM
You can but that setting is saved locally on the machine from the options menu.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Kelemvor on February 16, 2018, 11:36:05 AM
Quote from: Admin - Justin on February 16, 2018, 11:16:41 AM
You can but that setting is saved locally on the machine from the options menu.

I tried running the Beta version via a Scheduled Task that runs as the SYSTEM account and it doesn't seem to work.  It's been running in Task Manager for a couple hours already.  THe only thing in the log file is:
2/16/2018 9:11:59 AM - Patch My PC Started
2/16/2018 9:11:59 AM - Patch My PC running with command line option: /s

The Beta is v3.9 so I can wait until v4 next week and try again.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Justin Chalfant (Patch My PC) on February 16, 2018, 04:43:04 PM
what happens if you run it manually? We aren't having any issues with /s under system context.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Kelemvor on February 16, 2018, 05:18:11 PM
I am running it now at home and it seems to be working fine.  I'll try again on Monday when I'm back in the office and see how it goes.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Kelemvor on February 19, 2018, 09:05:56 AM
Two things:

1) Any chance the log file location could be modified to be stores in the Settings file like all the other settings?  If we are running Patchmypc.exe from a network share, each individual user will never run the program manually to set a location.  We want each computer to keep its own log so if we have to research something, we can do so.  If it just stores in the same folder as the EXE, then we'll just have one gigantic log file with 100 machine's information in it which won't be helpful at all.

2) When I run the program from a scheduled Task under the System account from my own machine, it seems to work fine.  But I've run the program manually so not sure if that would have changed something.  I had a different person just run the scheduled task, without having ever run the program manually, and he's getting what I got last week.  It shows up in Task Manager but just sits there forever and never does anything.

I had the person try copying the files to their local machine and running patchmypc.exe /s from an admin command prompt.  It ran for a few seconds and then just went away.

This is all that was in the log file:

2/19/2018 9:26:24 AM - Patch My PC Started
2/19/2018 9:26:24 AM - Patch My PC running with command line option: /s
2/19/2018 9:26:24 AM - Performing scan of installed applications
2/19/2018 9:26:25 AM - 7-Zip 16.04 (x64 edition)  -  16.04.00.0
2/19/2018 9:26:29 AM - Scan completed
2/19/2018 9:26:29 AM - Starting to perform updates automatically in silent mode
2/19/2018 9:26:33 AM - Patch My PC 4.0.0.0 | Definitions: 19-Feb-2018 | 2/19/2018 9:26:33 AM

2/19/2018 9:26:33 AM - Run With /S Switch
2/19/2018 9:26:33 AM - Operating System: Microsoft Windows 10 Enterprise x64

2/19/2018 9:26:33 AM - Operating System: 6.2.9200.0


They are a local admin of their machine as well.  No idea what the problem might be.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Kelemvor on February 19, 2018, 10:35:16 AM
OK.  Some more info.

No matter what we do, we can't get it to run as System, from a network drive.  Maybe it's a permissions thing or something.  No idea.

So, as a work around, I modified my GPO to now copy the patchmypc.exe, patchmypc.ini, defailtapps.settings, and patchmypc.settings files to the local C drive.  The Scheduled Task then runs it from that location.  This work.  Everything runs and the software gets updated.

However, this doesn't seem to work when told to use the Cache folder out on our network.  The log shows that it downloaded the updates from the internet instead of pulling them from the cache.

When I ran the program manually, it does have the path to the cache folder listed in options but it just seemed to ignore that settings.

Ideally what I'd like to happen is this:

Maybe it just can't do what we want and we'll jsut deal with having everyone have to download the files every time but just thought I'd check back in.

Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Justin Chalfant (Patch My PC) on February 19, 2018, 11:43:14 AM
Did you give All Computers read and execute permissions to the share?

Quote from: Kelemvor on February 19, 2018, 10:35:16 AM
OK.  Some more info.

No matter what we do, we can't get it to run as System, from a network drive.  Maybe it's a permissions thing or something.  No idea.

So, as a work around, I modified my GPO to now copy the patchmypc.exe, patchmypc.ini, defailtapps.settings, and patchmypc.settings files to the local C drive.  The Scheduled Task then runs it from that location.  This work.  Everything runs and the software gets updated.

However, this doesn't seem to work when told to use the Cache folder out on our network.  The log shows that it downloaded the updates from the internet instead of pulling them from the cache.

When I ran the program manually, it does have the path to the cache folder listed in options but it just seemed to ignore that settings.

Ideally what I'd like to happen is this:

  • PC runs PMP.exe /s based on the scheduled task.
    If it finds something out of date, it will look to our network share to see if the file it needs is already out there.  If it finds it, it will install the update.
    If it looks to the network share but doesn't find what it needs, I want it to go online and download the file and then put the installer into the cache folder for the next person.

Maybe it just can't do what we want and we'll jsut deal with having everyone have to download the files every time but just thought I'd check back in.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Kelemvor on February 20, 2018, 07:15:13 AM
We had tried giving explicit permissions to the folder but it didn't help.  So, we decided to just make the GPO as a User GPO so it will run as the user logged in.  That seems to be working fine.

The one problem we're having now is that we modified the .settings file to force the Log file to go into a folder on each person's C drive.  However, when someone runs the program with the /s flag, the First time it doesn't put the log file where we told it to.  Then if they run it again, the Second time it does put the log file where we specified.  I don't know if it's reading in the settings and running the scan at the same time so the settings don't take effect the first run or if it's a bug or what.

We're going to try running it the first time in Download Only mode to see if that works, and then run it the second time in regular mode so we can capture what each machine is doing.
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Justin Chalfant (Patch My PC) on February 20, 2018, 09:59:38 AM
The .settings file isn't supported in V4.0. We moved to PatchMyPC.ini this can store things in the options menu and any new selected apps. We wanted to merge the 2 old options into a single settings file. The log file location isn't something that is currently saved into the settings file though. You could try to set the path directly in the regsitry: HKEY_LOCAL_MACHINE\SOFTWARE\Patch My PC\Options\LogPath:YourPath. For larger businesses using GPO/Domains our SCUP Catalog solution for SCCM will be a better option.

Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: aminou on September 21, 2019, 02:19:03 PM
Quote from: Kelemvor on February 15, 2018, 09:55:34 PM
Thanks for the response.  If you think to reply here when the new version is out, that'd be great.  I'll give it a try right away.

You could try the latest beta if you want
Title: Re: Scheduled Task via Group Policy - Not sure if it's working
Post by: Mahirasharma on November 08, 2019, 11:18:35 PM
Great Information was very useful for me..