Note that there are some explanatory texts on larger screens.

plurals
  1. POAutoit Unable to open the script file
    primarykey
    data
    text
    <p>I am creating a basic installer in autoit. After compiling the script, I got the error Unable to open the script file when trying to run it.</p> <p>The Script:</p> <pre><code>#Region ;**** Directives created by AutoIt3Wrapper_GUI **** #AutoIt3Wrapper_Icon=..\Resources\unnamed.ico #AutoIt3Wrapper_Outfile=..\..\..\Desktop\Minecraft Server Launcher Installer.exe #AutoIt3Wrapper_UseX64=n #AutoIt3Wrapper_Res_File_Add=C:\Users\Kristian\SkyDrive\Autoit\Bungee Minecraft Server Launcher.exe, rt_rcdata, Launcher #AutoIt3Wrapper_Res_File_Add=C:\Users\Kristian\SkyDrive\Autoit\Bungee Server Launcher\Licence.txt, rt_rcdata, Licence #AutoIt3Wrapper_Add_Constants=n #AutoIt3Wrapper_AU3Check_Stop_OnWarning=y #EndRegion ;**** Directives created by AutoIt3Wrapper_GUI **** #include &lt;GUIConstants.au3&gt; #include &lt;GUIConstantsEx.au3&gt; #include &lt;WindowsConstants.au3&gt; #include &lt;EditConstants.au3&gt; #include &lt;resources.au3&gt; $msgbox1 = MsgBox(36, "Minecraft Server Launcher Installer", "Do you want to install the Launcher?") If $msgbox1 = 6 Then GUICreate("Minecraft Server Launcher Installer", 373, 325) GUICtrlCreateLabel("Read the following agreement. Scroll down to view the rest of the agreement.", 10, 10) GUICtrlCreateEdit(_ResourceGetAsString("Licence"), 10, 51, 350, 191, $WS_VSCROLL + $ES_READONLY + $ES_MULTILINE) GUICtrlCreateLabel("Do you accept all the terms of the license agreement? Selecting No" &amp; @CRLF &amp; "cancels the installation. You must accept the agreement to install.", 10, 250) $YES = GUICtrlCreateButton("Yes", 204, 296, 75, 23) $NO = GUICtrlCreateButton("No", 290, 296, 75, 23) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $YES Choose_Loc() Case $NO Exit EndSwitch WEnd EndIf Func Choose_Loc() GUIDelete() GUICreate("Minecraft Server Launcher Installer", 363, 108) GUICtrlCreateLabel("Choose Install Location", 10, 5) $INPUT = GUICtrlCreateInput("C:\Program Files (x86)\KnarCraft\Minecraft Server Launcher", 10, 40, 255, 22) $BROWSE = GUICtrlCreateButton("Browse...", 275, 40, 80, 23) $CANCEL = GUICtrlCreateButton("Cancel", 275, 75, 80, 23) $OK = GUICtrlCreateButton("OK", 185, 75, 80, 23) GUISetState(@SW_SHOW) While 1 $msg = GUIGetMsg() Switch $msg Case $GUI_EVENT_CLOSE Exit Case $CANCEL Exit Case $OK Install($INPUT) Case $BROWSE $FOLDER = FileSelectFolder("Choose Install Location...", "", 7) If Not $FOLDER = "" Then GUICtrlSetData($INPUT, $FOLDER) EndSwitch WEnd EndFunc ;==&gt;Choose_Loc Func Install($INPUT) _ResourceSaveToFile(GUICtrlRead($INPUT) &amp; "\Bungee Minecraft Server Launcher.exe", "Launcher", $RT_RCDATA, 0, 1) FileCreateShortcut(GUICtrlRead($INPUT) &amp; "\Bungee Minecraft Server Launcher.exe", @DesktopDir &amp; "\Bungee Minecraft Server Launcher.ink") GUIDelete() If Not @error Then MsgBox(36, "Finished", "Installation completed with no errors. Please enjoy your new software.") Else MsgBox(16, "Finished", "The installation was interrupted by an error and the software may not work.") EndIf Exit EndFunc ;==&gt;Install </code></pre> <p>I know that it's this line that creates the error:</p> <pre><code>#AutoIt3Wrapper_Res_File_Add=C:\Users\Kristian\SkyDrive\Autoit\Bungee Server Launcher\Licence.txt, rt_rcdata, Licence </code></pre> <p>But I don't know why or how to fix it. I had the same problem with:</p> <pre><code>#AutoIt3Wrapper_Res_File_Add=C:\Users\Kristian\SkyDrive\Autoit\Bungee Minecraft Server Launcher.exe, rt_rcdata, Launcher </code></pre> <p>I know that it's the Res_Add line because if I remove that line, the error will disappear.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload