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

Microsoft Configuration Manager and Intune (Enterprises/Paid) => Report Update/App Install Issues (Enterprises Using ConfigMgr and Intune) => Topic started by: Paweł Kaczanowski 7N on March 09, 2022, 03:41:12 AM

Title: Adobe Reader - Office apps permanently locked after Reader installation hang
Post by: Paweł Kaczanowski 7N on March 09, 2022, 03:41:12 AM
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
Title: Re: Adobe Reader - Office apps permanently locked after Reader installation hang
Post by: Scott (Patch My PC) on March 09, 2022, 04:23:15 AM
Hey Pawel

Thanks for reaching out on our forum. Just to clarify are you looking to troubleshoot why the install for Adobe Reader DC hangs?

If so could you please provide me the following logs from the client side
Config Mgr App
https://patchmypc.com/collecting-log-files-for-patch-my-pc-support#application-troubleshooting-client-logs
Intune App
https://patchmypc.com/collecting-log-files-for-patch-my-pc-support#application-troubleshooting-client-logs-intune

And the following server side logs

You can send these to me at [email protected]


Title: Re: Adobe Reader - Office apps permanently locked after Reader installation hang
Post by: Paweł Kaczanowski 7N on March 09, 2022, 04:30:11 AM
Purpose of this post was to share quick solution if someone hit similar issue with PatchMyPC Install Script and to highlight that such issue exist.
App which PatchMyPC install can hang during installation for milion reasons but this should not cause permanent lock of Office Apps as it could kill productivity of whole company.