JoHanatCent Posted January 25, 2022 Posted January 25, 2022 I'm trying to make it easier to set Acrobat as default for .pdf files. None of these helps because it just keeps on opening with Edge. Tried assoc, ftype, xml setting and even registry settings. The only way is to go to file settings and manually change it. This is what I have so far but would like to do the whole thing without using TAB's $DosCMD = 'start ms-settings:defaultapps' RunWait(@ComSpec & ' /C ' & $DosCMD, '', @SW_Show) Quote Quote The other way is to open file properties and select Acrobat
JoHanatCent Posted February 2, 2022 Author Posted February 2, 2022 Still stuck. Tried this as well: $iPID = Run("explorer.exe /select, d:\temp\tow.pdf");Any pdf file should do Sleep(500) Send("{SHIFTDOWN}") Sleep(500) Send("{f10}") Sleep(500) Send("o") Sleep(500) Send("c") Send("{SHIFTUP}") Sleep(1500) $A = ProcessClose($iPID) Sleep(500)
ad777 Posted February 2, 2022 Posted February 2, 2022 @JoHanatCent $DosCMD = 'Assoc .pdf' $DosCMD2 = 'Ftype pdffile=C:\type here path..\acrobat.exe %1' RunWait(@ComSpec & ' /C ' & $DosCMD, '', @SW_Show) RunWait(@ComSpec & ' /C ' & $DosCMD2, '', @SW_Show) iam ِAutoit programmer. best thing in life is to use your Brain to Achieve everything you want.
JoHanatCent Posted February 2, 2022 Author Posted February 2, 2022 Done that. See first post. It does change when one check BUT Edge is still opening the pdf file. There are also no policies set.
ad777 Posted February 2, 2022 Posted February 2, 2022 (edited) @JoHanatCent do the Following.. Note: Run.zip contain's:Run.bat®ini.ini Run.bat Contain's: regini regini.ini regini.ini Contain's: HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice [1 7 17] dont forget to run script as Admin.. First Run these Functions: $DosCMD = 'Assoc .pdf=pdffile' $DosCMD2 = 'Ftype pdffile=C:\Acrobat.exe %*';you might want to change path to the folder of Acrobat.exe RunWait(@ComSpec & ' /C ' & $DosCMD, '', @SW_Show) RunWait(@ComSpec & ' /C ' & $DosCMD2, '', @SW_Show) secound run batch file download it from below: third use these Functions: RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithList","z","REG_SZ","Acrobat.exe");type here the .exe RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithList","MRUList","REG_SZ","z") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithProgids","pdffile","REG_BINARY","") ;after that use this: RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice","Progid","REG_SZ","pdffile") Run.zip Edited February 2, 2022 by ad777 iam ِAutoit programmer. best thing in life is to use your Brain to Achieve everything you want.
JoHanatCent Posted February 3, 2022 Author Posted February 3, 2022 It all looks familiar. So I tried in your order as described above. See attached result. I also checked assoc and ftype. They show indeed acrobat. BUT Edge still open pdf files! #RequireAdmin $DosCMD = 'Assoc .pdf=pdffile' $DosCMD2 = 'Ftype pdffile=C:\Program Files\Adobe\Acrobat DC\Acrobat.exe %*';you might want to change path to the folder of Acrobat.exe RunWait(@ComSpec & ' /C ' & $DosCMD, '', @SW_Show) RunWait(@ComSpec & ' /C ' & $DosCMD2, '', @SW_Show) sleep(2000) RunWait(@ComSpec & ' /C ' & 'd:\temp\run.bat', @SW_Show) sleep(2000) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithList","z","REG_SZ","C:\Program Files\Adobe\Acrobat DC\Acrobat.exe") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithList","MRUList","REG_SZ","z") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithProgids","pdffile","REG_BINARY","") sleep(5000) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice","Progid","REG_SZ","pdffile")
ad777 Posted February 3, 2022 Posted February 3, 2022 (edited) @JoHanatCent put the Acrobat.exe not full path ...& use RunWat(@systemDir &"....... D:\regini.ini the script below idid just replaced C:\.... to Acrobat.exe and add RunWait.... #RequireAdmin $DosCMD = 'Assoc .pdf=pdffile' $DosCMD2 = 'Ftype pdffile=C:\Program Files\Adobe\Acrobat DC\Acrobat.exe %*' RunWait(@ComSpec & ' /C ' & $DosCMD, '', @SW_Show) RunWait(@ComSpec & ' /C ' & $DosCMD2, '', @SW_Show) sleep(2000) RunWait(@SystemDir &'\regini.exe ' & 'D:\regini.ini') Exit sleep(2000) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithList", "z", "REG_SZ", "Acrobat.exe") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithList", "MRUList", "REG_SZ", "z") RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\OpenWithProgids", "pdffile", "REG_BINARY", "") sleep(5000) RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.pdf\UserChoice", "Progid", "REG_SZ", "pdffile") Edited February 3, 2022 by ad777 iam ِAutoit programmer. best thing in life is to use your Brain to Achieve everything you want.
JoHanatCent Posted February 4, 2022 Author Posted February 4, 2022 Sorry it is not working. Checked if registry entries worked - it did. Checked if Assoc changed - it did. Checked if Ftype changed = it did. Edge still open pdf files. <<< Very frustrating! Right clicked on a pdf file and changed to Adobe - it worked. Adobe opened the PDF files. <<< Very happy But 12 hours later it is all back to Edge !!! (No restart no updates nothing just like magic)
ad777 Posted February 4, 2022 Posted February 4, 2022 @JoHanatCent check registry File located at:HKEY_CLASSES_ROOT\.pdf\OpenWithProgids\... Delete all file, if you need i think edge start with :a3094034xsaadwdaw2 iam ِAutoit programmer. best thing in life is to use your Brain to Achieve everything you want.
JoHanatCent Posted February 5, 2022 Author Posted February 5, 2022 I found this in your registry address. Deleted the MSEdgePDF entry. It did delete. Restarted the PC. That entry was no longer in the registry. BUT Edge still open the PDF files. Again right click on the file. Changed to Acrobat. Everything works with Acrobat. Also checked the file assoc and FType they changed to Acrobat. It was about two hours later and Edge is back! I don't even use Edge as a browser. I'm using Chrome. (I even did some recommended changes in Edge to stop it. Not working!!!!!)
ad777 Posted February 5, 2022 Posted February 5, 2022 (edited) @JoHanatCent just delete folder C:\Windows\SystemApps\Microsoft.MicrosoftEdge_8wekyb3d8bbwe and use removeedge.bat contains: REG DELETE HKEY_CLASSES_ROOT\Applications\MicrosoftEdge.exe REG DELETE HKEY_CLASSES_ROOT\AppX4hxtad77fbk3jkkeerkrm0ze94wjf3s9 REG DELETE HKEY_CLASSES_ROOT\AppX7rm9drdg8sk7vqndwj3sdjw11x96jc0y REG DELETE HKEY_CLASSES_ROOT\AppX90nv6nhay5n6a98fnetv7tpk64pp35es REG DELETE HKEY_CLASSES_ROOT\AppXd4nrz8ff68srnhf9t5a8sbjyar1cr723 REG DELETE HKEY_CLASSES_ROOT\AppXe862j7twqs4aww05211jaakwxyfjx4da REG DELETE HKEY_CLASSES_ROOT\AppXq0fevzme2pys62n3e0fbqa7peapykr8v REG DELETE HKEY_CLASSES_ROOT\Extensions\ContractId\Windows.AppService\PackageId\Microsoft.MicrosoftEdge_20.10240.16384.0_neutral__8wekyb3d8bbwe REG DELETE HKEY_CLASSES_ROOT\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.MicrosoftEdge_20.10240.16384.0_neutral__8wekyb3d8bbwe\ActivatableClassId\MicrosoftEdge.AppX9zvsr9qeth9e9a03yr0g7rpdrcrwgn5r.mca REG DELETE HKEY_CLASSES_ROOT\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.MicrosoftEdge_20.10240.16384.0_neutral__8wekyb3d8bbwe\ActivatableClassId\MicrosoftEdge.AppXeb42j1vh6rk395pm0vmcx57dxqjhej5d.mca REG DELETE HKEY_CLASSES_ROOT\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.MicrosoftEdge_20.10240.16384.0_neutral__8wekyb3d8bbwe\ActivatableClassId\MicrosoftEdge.AppXg58n4jqcxjfvb6epaz8mmvfjtq8mhj65.mca REG DELETE HKEY_CLASSES_ROOT\Extensions\ContractId\Windows.Protocol\PackageId\Microsoft.MicrosoftEdge_20.10240.16384.0_neutral__8wekyb3d8bbwe\ActivatableClassId\MicrosoftEdge.AppXrwh8xyerps7kqvjsngqmvwenddpt3g5w.mca REG DELETE HKEY_CLASSES_ROOT\Local Settings\MrtCache\C:%5CWindows%5CSystemApps%5CMicrosoft.MicrosoftEdge_8wekyb3d8bbwe%5Cresources.pri\1d0bae9f15aaafe\25b9d515 REG DELETE HKEY_CLASSES_ROOT\Local Settings\MrtCache\C:%5CWindows%5CSystemApps%5CMicrosoft.MicrosoftEdge_8wekyb3d8bbwe%5Cresources.pri\1d0bae9f15aaafe REG DELETE HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Mappings\S-1-15-2-3624051433-2125758914-1423191267-1740899205-1073925389-3782572162-737981194 REG DELETE HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\Children\001\Internet Settings\Cache\Extensible Cache REG DELETE HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\Internet Settings\Cache\Cookies REG DELETE HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppContainer\Storage\microsoft.microsoftedge_8wekyb3d8bbwe\Children\121\Internet Settings\Cache\Extensible Cache REG DELETE HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\PackageRepository\Packages\Microsoft.MicrosoftEdge_20.10240.16384.0_neutral__8wekyb3d8bbwe REG DELETE HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\Repository\Packages\Microsoft.MicrosoftEdge_20.10240.16384.0_neutral__8wekyb3d8bbwe REG DELETE HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\Microsoft.MicrosoftEdge_8wekyb3d8bbwe REG DELETE HKEY_CLASSES_ROOT\Local Settings\Software\Microsoft\Windows\CurrentVersion\AppModel\SystemAppData\Microsoft.MicrosoftEdge_8wekyb3d8bbwe\SplashScreen\Microsoft.MicrosoftEdge_8wekyb3d8bbwe!MicrosoftEdge REG DELETE HKEY_CLASSES_ROOT\microsoft-edge removeedge.bat Edited February 5, 2022 by ad777 edit iam ِAutoit programmer. best thing in life is to use your Brain to Achieve everything you want.
Werty Posted February 6, 2022 Posted February 6, 2022 (edited) There's a setting in Edge that changes behaviour from viewing pdf(default) to "download" pdf instead. Edge-->three small dots top right corner-->Settings-->Cookies and site permissions-->PDF Documents-->turn ON "always download" instead of viewing. I dont know if it helps, but could be that Edge "takes over", it does have stuff running in the background eventhough it's closed, that can be turned of though. Edited February 6, 2022 by Werty Some guy's script + some other guy's script = my script!
JoHanatCent Posted February 8, 2022 Author Posted February 8, 2022 @ad777 - Thank you for all your efforts. I'll rather not do the last suggested changes. It looks a bit extreme for my problem. Besides I may want to use Edge from time to time ; > @Werty - Yes I did that setting. But Edge sometimes just takes over any way. So I'm back to my initial Tab and send keys. Ckecking with Assoc .pdf every hour. Then only run the correction.
Deye Posted February 9, 2022 Posted February 9, 2022 Funnily windows 10 is not a finished product and still people will expect things to work as if it was "windows xp" , maybe this will be fixed in windows 11 Doniel 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now