tris20 0 Posted July 23, 2019 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
JLogan3o13 1,649 Posted July 23, 2019 @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! Share this post Link to post Share on other sites
tris20 0 Posted July 27, 2019 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 **** #RequireAdmin DirCreate ("c:\TEMP") Sleep(1000) 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") GUISetState(@SW_SHOW) #EndRegion ### END Koda GUI section ### While 1 $nMsg = GUIGetMsg() Switch $nMsg Case $GUI_EVENT_CLOSE, $Exitbutton Exit Case $pdf ShellExecute("c:\TEMP\pdf_test.pdf") EndSwitch WEnd Share this post Link to post Share on other sites
Seminko 11 Posted July 27, 2019 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
tris20 0 Posted July 28, 2019 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