Jump to content
Sign in to follow this  

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.

Share this post

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


Share this post

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?

Share this post

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.

Share this post

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...