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

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Topics - Paweł Kaczanowski 7N

#1
Adobe Reader DC Continuous 2022.001.20085 x64 Installation hang on ~40% of Intune enrolled computers in my Organization.
This is causing lock on Office Apps to don't interfere with Installation.
But since installation hangs, lock is never turned off, even after computer restart.

I was forced to prepare emergency fix for this issue, since ~40% of employees cant use Office Apps.
Below you find script which force to unlock all apps locked by PatchMyPC on user login, just add it to Intune scripts(set 'Run script in 64 bit PowerShell Host' to Yes):
$ErrorActionPreference = 'Stop'
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
Start-Transcript -Path "C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\PMPCFixInstall.log" -Force -Append

$content = @'
$ErrorActionPreference = 'Stop'
[Console]::OutputEncoding = [System.Text.Encoding]::UTF8
Start-Transcript -Path "C:\ProgramData\Microsoft\IntuneManagementExtension\Logs\PMPCFix.log" -Force -Append

$l = Get-ChildItem 'Registry::HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Image File Execution Options\'

$l | Where-Object Property -EQ 'Debugger' | Where-Object { (Get-ItemProperty $_.PSPath -Name 'Debugger') -like "*PatchMyPC-PreventStart.exe*" } | ForEach-Object {
    Remove-ItemProperty -Path $_.PSPath -Name Debugger
}

Stop-Transcript
'@
$path = $(Join-Path $env:ProgramData AutopilotScripts)
if (!(Test-Path $path)) {
    New-Item -Path $path -ItemType Directory -Force -Confirm:$false
}
Out-File -FilePath $(Join-Path $env:ProgramData AutopilotScripts\PMPCFix.ps1) -Encoding unicode -Force -InputObject $content -Confirm:$false

$TriggerLogon = New-ScheduledTaskTrigger -AtLogOn
$STPrin = New-ScheduledTaskPrincipal -UserId "SYSTEM" -LogonType ServiceAccount
$CustomPath = 'C:\ProgramData\AutopilotScripts\PMPCFix.ps1'
$Action = New-ScheduledTaskAction -Execute "powershell.exe" -Argument "-ex bypass -file $CustomPath"
$Settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries

Register-ScheduledTask -Action $Action -Settings $Settings -Trigger $TriggerLogon -TaskName "PatchMyPCFix" -Principal $STPrin

Stop-Transcript