Closed wpltechstaff closed 2 years ago
Hello, are you sure you're importing the PS file before running the command?
Yes, I think if I tried without importing, I would get an error stating that Get-FTA / Set-FTA are unrecognized commands.
I have done some more troubleshooting:
& .\Set-FTA.ps1
Write-host "FTA is $(Get-FTA .pdf)"
Remove-FTA MSEdgePDF .pdf
Write-host "FTA is $(Get-FTA .pdf)"
Set-FTA AcroExch.Document.DC .pdf
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Write-host "FTA at $(Get-Date) is $(Get-FTA .pdf)"; start-sleep -Milliseconds 100
Results in:
FTA is MSEdgePDF
Removed: MSEdgePDF
FTA is
FTA at 04/11/2022 13:47:20 is AcroExch.Document.DC
FTA at 04/11/2022 13:47:20 is AcroExch.Document.DC
FTA at 04/11/2022 13:47:20 is AcroExch.Document.DC
FTA at 04/11/2022 13:47:20 is AcroExch.Document.DC
FTA at 04/11/2022 13:47:20 is AcroExch.Document.DC
FTA at 04/11/2022 13:47:21 is MSEdgePDF
FTA at 04/11/2022 13:47:21 is MSEdgePDF
FTA at 04/11/2022 13:47:21 is MSEdgePDF
FTA at 04/11/2022 13:47:21 is MSEdgePDF
FTA at 04/11/2022 13:47:21 is MSEdgePDF
FTA at 04/11/2022 13:47:21 is MSEdgePDF
FTA at 04/11/2022 13:47:21 is MSEdgePDF
FTA at 04/11/2022 13:47:21 is MSEdgePDF
FTA at 04/11/2022 13:47:21 is MSEdgePDF
So, it is being set, but nearly immediately being reverted back to MSEdgePDF. I confirmed that this happens when Edge is not running, both Edge update services are disabled, and all scheduled tasks are removed. I wonder what could be reverting this??
Did you tried using -verbose? to get some debug information. I'm not sure what could be the issue. I've never got such issue.
Here it is with -verbose everywhere
VERBOSE: Get File Type Association for .pdf
FTA is MSEdgePDF
VERBOSE: Remove User UserChoice Key If Exist: Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice
VERBOSE: Remove Key If Exist: HKCU:\SOFTWARE\Classes\MSEdgePDF
VERBOSE: Key No Exist: HKCU:\SOFTWARE\Classes\MSEdgePDF
VERBOSE: Remove Property If Exist: HKCU:\SOFTWARE\Classes\.pdf\OpenWithProgids Property MSEdgePDF
VERBOSE: Property No Exist: HKCU:\SOFTWARE\Classes\.pdf\OpenWithProgids Property: MSEdgePDF
Removed: MSEdgePDF
VERBOSE: Get File Type Association for .pdf
FTA is
VERBOSE: ProgId: AcroExch.Document.DC
VERBOSE: Extension/Protocol: .pdf
VERBOSE: Getting Hash For AcroExch.Document.DC .pdf
VERBOSE: baseInfo: .pdfs-1-5-21-1509256243-45632361-3638946562-500acroexch.document.dc01d84dce3da11c00user choice set via windows user
experience {d18b6dd5-6124-4341-9318-804003bafa0b}
VERBOSE: Hash: ZHZx2cYtCF8=
VERBOSE: Write Registry Extension: .pdf
VERBOSE: Remove Extension UserChoice Key If Exist: Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice
VERBOSE: Write Reg Extension UserChoice OK
VERBOSE: Get File Type Association for .pdf
FTA at 04/11/2022 14:02:00 is AcroExch.Document.DC
VERBOSE: Get File Type Association for .pdf
FTA at 04/11/2022 14:02:00 is AcroExch.Document.DC
VERBOSE: Get File Type Association for .pdf
FTA at 04/11/2022 14:02:00 is AcroExch.Document.DC
VERBOSE: Get File Type Association for .pdf
FTA at 04/11/2022 14:02:00 is AcroExch.Document.DC
VERBOSE: Get File Type Association for .pdf
FTA at 04/11/2022 14:02:00 is AcroExch.Document.DC
VERBOSE: Get File Type Association for .pdf
FTA at 04/11/2022 14:02:00 is MSEdgePDF
VERBOSE: Get File Type Association for .pdf
FTA at 04/11/2022 14:02:01 is MSEdgePDF
VERBOSE: Get File Type Association for .pdf
FTA at 04/11/2022 14:02:01 is MSEdgePDF
VERBOSE: Get File Type Association for .pdf
FTA at 04/11/2022 14:02:01 is MSEdgePDF
VERBOSE: Get File Type Association for .pdf
FTA at 04/11/2022 14:02:01 is MSEdgePDF
I don't know what could be the issue. All seems to be correct. when you do it manually do you get it working correctly? I meant using OpenWith.exe?
Yes, if I change it in the UI (Right Click -> Properties -> Opens with) and choose Adobe Acrobat Reader, it sticks and works. And Get-FTA says AcroExch.Document.DC and stays. We're trying to deploy this to many computers so we need something that can be done programmatically in PS or CMD.
I understand it's really werid the issue. Is there a possibility to get remote access to one of the machines to do some tests?
I am open to it. Do you have a tool in mind for this? We could maybe have a Zoom call and I could share my screen?
Email me at hello.danysys@gmail.com so we can discuss further about it.
I was able to get the defaults to set and stick with SetUserFTA.exe. I am not sure exactly what it does differently from PS-SFTA, but it seems to work consistently to get Adobe Reader to open PDFs. I still blame Microsoft for making Edge so aggressive.
If You still could give me remote access to one of the machines having the issue I could check SetUserFTA.exe and PS-SFTA and try to fix the issue.
I'm closing this due to inactivity.
We are desperately trying to get Adobe Reader to be the default application for PDF files (rather than Edge). Currently on Windows 10 21H2, the FTA keeps getting reset to MSEdgePDF no matter what I do.
Commands:
What am I missing?