Last active
January 7, 2023 20:43
-
-
Save Katzenwerfer/cd8cdd999403e0e3ebd102b805ac2391 to your computer and use it in GitHub Desktop.
A task that kills the EABackgroundService process when the launcher is fully closed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-16"?> | |
<Task version="1.4" xmlns="http://schemas.microsoft.com/windows/2004/02/mit/task"> | |
<RegistrationInfo> | |
<Author>Katzenwerfer</Author> | |
<Description>Kills the EABackgroundService process after the launcher finishes its exit process.</Description> | |
<URI>\Katzenwerfer\Kill_EABackgroundService</URI> | |
</RegistrationInfo> | |
<Triggers> | |
<EventTrigger> | |
<Enabled>true</Enabled> | |
<Subscription><QueryList><Query Id="0" Path="Security"><Select Path="Security">*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and Task = 13313 and (EventID=4689)]] and *[EventData[Data[@Name='ProcessName'] and (Data='C:\Program Files\Electronic Arts\EA Desktop\EA Desktop\EADesktop.exe')]] | |
</Select></Query></QueryList></Subscription> | |
</EventTrigger> | |
</Triggers> | |
<Principals> | |
<Principal id="Author"> | |
<LogonType>S4U</LogonType> | |
<RunLevel>HighestAvailable</RunLevel> | |
</Principal> | |
</Principals> | |
<Settings> | |
<MultipleInstancesPolicy>StopExisting</MultipleInstancesPolicy> | |
<DisallowStartIfOnBatteries>false</DisallowStartIfOnBatteries> | |
<StopIfGoingOnBatteries>false</StopIfGoingOnBatteries> | |
<AllowHardTerminate>true</AllowHardTerminate> | |
<StartWhenAvailable>true</StartWhenAvailable> | |
<RunOnlyIfNetworkAvailable>false</RunOnlyIfNetworkAvailable> | |
<IdleSettings> | |
<StopOnIdleEnd>false</StopOnIdleEnd> | |
<RestartOnIdle>false</RestartOnIdle> | |
</IdleSettings> | |
<AllowStartOnDemand>true</AllowStartOnDemand> | |
<Enabled>true</Enabled> | |
<Hidden>false</Hidden> | |
<RunOnlyIfIdle>false</RunOnlyIfIdle> | |
<DisallowStartOnRemoteAppSession>false</DisallowStartOnRemoteAppSession> | |
<UseUnifiedSchedulingEngine>true</UseUnifiedSchedulingEngine> | |
<WakeToRun>false</WakeToRun> | |
<ExecutionTimeLimit>PT1H</ExecutionTimeLimit> | |
<Priority>7</Priority> | |
<RestartOnFailure> | |
<Interval>PT1M</Interval> | |
<Count>5</Count> | |
</RestartOnFailure> | |
</Settings> | |
<Actions Context="Author"> | |
<Exec> | |
<Command>C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe</Command> | |
<Arguments>-NoLogo -NoProfile -NonInteractive -WindowStyle Hidden -Command "Stop-Process -Name 'EABackgroundService' -Force"</Arguments> | |
<WorkingDirectory>C:/</WorkingDirectory> | |
</Exec> | |
</Actions> | |
</Task> |
Do note that you need to enable the Audit process tracking policy
for it to work.
It should be located in \Local Computer Policy\Computer Policy\Windows Settings\Security Settings\Audit Policy\
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If you want the PowerShell window to be completely hidden, you need to configure the task to
Run wheter the user is logged on or not
.If you'd like, you can tick the
Do not store password
property. It will still run just fine.