Jump to content

Shellexecute ruins acrobat reader

Recommended Posts

hi guys,


when i use shellexecute in my script to open an file. it doenst start acrobat reader and not only that. it ruins acrobat and i cant start it anymore and must reinstall it. 

anyone an idea how this is possible. and question.

what can i use to open an document or file from an script that opens with defauld windows program? i used shellexecute.

Link to post
Share on other sites
  • Moderators

@tris20 how about posting your code so we can see what you're doing, rather than having us guess?

"Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball

How to get your question answered on this forum!

Link to post
Share on other sites
On 7/23/2019 at 7:04 PM, JLogan3o13 said:

@tris20 how about posting your code so we can see what you're doing, rather than having us guess?

youre totaly right. sorry.


#Region ;**** Directives created by AutoIt3Wrapper_GUI ****
#AutoIt3Wrapper_Outfile=menu test.Exe
#EndRegion ;**** Directives created by AutoIt3Wrapper_GUI ****
DirCreate ("c:\TEMP")

FileInstall ("C:\Users\Retro\Documents\autoit projecten\pdf_test.pdf", "c:\TEMP\pdf_test.pdf", 1)

#include <ButtonConstants.au3>
#include <GUIConstantsEx.au3>
#include <WindowsConstants.au3>
#Region ### START Koda GUI section ### Form=c:\users\retro\documents\menu.kxf
Global $Menu = GUICreate("Menu", 615, 437, -1, -1)
Global $pdf = GUICtrlCreateButton("pdf", 16, 16, 75, 25)
Global $Exitbutton = GUICtrlCreateButton("Exit", 520, 400, 75, 25)
GUICtrlSetFont(-1, 8, 800, 0, "MS Sans Serif")
#EndRegion ### END Koda GUI section ###

While 1
    $nMsg = GUIGetMsg()
    Switch $nMsg
        Case $GUI_EVENT_CLOSE, $Exitbutton
        Case $pdf


Link to post
Share on other sites

What happens when you open the file from the disc by hand?

Have you tried it without the FIleInstall script? Just pure ShellExecute without any other code?

What about other PDFs?

What about other files? Have you tried ShellExecuting a random *.txt?

Have you tried the 'verb' parameter of ShellExecute?

Link to post
Share on other sites

when i open the file from disk everything is fine. but when i opened it from the script then it doenst open. after that i even cant start acrobat reader anymore and an fresh install is needed. 


haven't tried any other way in the script.


my goal is to make an menu and from there open the pdf files or ather files. but also make it so that the files are included in the exe.

Link to post
Share on other sites
  • 2 years later...

I'm sorry but I can't write in English, so i need to use google translator

I propose this modified 

or remove 


Alternatively it can be set via the following registry key:

[HKEY_CURRENT_USER\Software\Adobe\Acrobat Acrobat\DC\Privileged]


Edited by bdr529
Link to post
Share on other sites

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