• Welcome to Support Forum: Get Support for Patch My PC Products and Services.
 

Scheduled Task via Group Policy - Not sure if it's working

Started by Kelemvor, February 15, 2018, 09:14:37 AM

Previous topic - Next topic

Kelemvor

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.

danvega

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

Kelemvor

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...

Justin Chalfant (Patch My PC)

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.

Kelemvor

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.

Justin Chalfant (Patch My PC)

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.

Kelemvor

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.

Justin Chalfant (Patch My PC)

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

Kelemvor

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

Justin Chalfant (Patch My PC)

You can but that setting is saved locally on the machine from the options menu.

Kelemvor

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.

Justin Chalfant (Patch My PC)

what happens if you run it manually? We aren't having any issues with /s under system context.

Kelemvor

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.

Kelemvor

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.

Kelemvor

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.