Jump to content

Recommended Posts

Posted

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

 

 

  • 2 weeks later...
Posted (edited)

@JoHanatCent

do the Following..

Note:

Run.zip contain's:Run.bat&regini.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 by ad777

iam ِAutoit programmer.

best thing in life is to use your Brain to

Achieve

everything you want.

Posted

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")

 

Edge.JPG

Posted (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 by ad777

iam ِAutoit programmer.

best thing in life is to use your Brain to

Achieve

everything you want.

Posted

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)

 

Posted

@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.

Posted

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!!!!!)

1408238467_Edge1.JPG.842ae25656a7f9edcbb357bb5e80943d.JPG

Posted (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 by ad777
edit

iam ِAutoit programmer.

best thing in life is to use your Brain to

Achieve

everything you want.

Posted (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 by Werty

Some guy's script + some other guy's script = my script!

Posted

@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.  

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...