au3-2-exe

  • Moin

    Ich würde gerne bei dem Beispielscript aus der erstellten "Hello_World.au3" via Script eine "Hello_World..exe" erstellen lassen.

    ! ! Es ist kein AutoIt auf dem PC wo die Exe erstellt werden soll. ! !

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    OuBVU5ebLhHu5QvlnAyQB4A7SzBrvWulwL7RLl2BdH5tI6sIYspeMKeXMSXl

  • Das mit deinem Fileinstall habe ich bei mir aus Testgründen weggelassen aber der Rest würde so funktionieren:

    Der Einzige Unterschied, sind die " und ' in deinem $test.

    Zudem beforzuge ich das /out mit zu definieren.

    Einmal editiert, zuletzt von Moombas (5. Mai 2022 um 15:34)

  • Moin.

    1.) Mit fehlt zur Zeit die datei:
    C:\Programme\AutoIt3\Aut2Exe\AutoItSC.bin
    Mal sehen wo ich die her bekomme.

    Die "Hello_World.au3" wird erstellt, aber ich möchte das daraus die "Hello_World.exe" wird und die "Hello_World.au3" später gelöscht wird.
    Das ist mein Problem. Die Hello_World.au3" ist ja nur ein Beispiel. Das umwandeln in eine EXE Datei ist das X( !

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    OuBVU5ebLhHu5QvlnAyQB4A7SzBrvWulwL7RLl2BdH5tI6sIYspeMKeXMSXl

  • ! ! Es ist kein AutoIt auf dem PC wo die Exe erstellt werden soll. ! !

    Warum dann die EXE? Kompiliere dir irgendeine funktionslose Alibi-AutoIt.exe. Dann kannst du als Parameter jede *.au3 ausführen, sofern diese keine zusätzlichen Includes braucht.

    Zitat von AutoIt Hilfe
    Code
    Run a script using another compiled script:
    
    Compiled.exe [/ErrorStdOut] /AutoIt3ExecuteScript file [params ...]
                    Execute another AutoIt script file from a compiled AutoIt3 executable. 
    
    Compiled.exe [/ErrorStdOut] /AutoIt3ExecuteLine "command line"
                    Execute one line of code as with AutoIt3.exe above. 
    
    This means that there is no need to have a copy of AutoIt3.exe in addition to the compiled file - the interpreter stub of the compiled file will replace it.  So as long as there is at least one compiled script available, other AutoIt scripts can be run without the need to have AutoIt3.exe on the machine., either pre-installed or added via FileInstall.
  • Bin ich jetzt deppert?

    Das wird sie doch inmeinem Beispiel (bzw. deinem, nur korrigiert).

  • Bei dem Hinweis von BugFix ist aber wichtig das Kleingedruckte in der Hilfe zu lesen. :)

    Und ich bin heil froh, dass es so ist, sonst wäre das eine recht große Sicherheitslücke meiner Meinung nach.

    Zitat

    aus der Hilfe:

    Running Scripts

    Important Notes

    However, the executable must have been compiled with the #pragma compile(AutoItExecuteAllowed, True) directive as the default setting does not permit use of the /AutoItExecuteScript or /AutoItExecuteLine parameters. Moreover, since the interpreter stub searches for any required standard #include files in its current folder, UDF functions and various constants may not be available as those files are normally only found in the full AutoIt install. It is therefore recommended that any scripts intended to be run in this manner are compiled to the .a3x format rather then being left as plain .au3 text files

    Correct usage of single and double quotation marks is important when using the command line - even for double single quotation marks.

    If not :?: then ?( else :thumbup:

  • Wie gesagt, mein Beispiel aus #7 funktioniert.

    Bedeutet, das du wenn du den Inhalt von $test dynamisch aus einer externen Datei ziehen würdest, es mit diesem Skript kompiliert werden würde (und schlimmsten falls auch ausgeführt wird).

    Aber wenn wir ehrlich sind: Wenn du soweit kommst, das jemand per extern Zugriff auf das Dateisystem/CMD hast (und somit solche Meachaniken nutzen könnte), hast du so oder so schon verloren.

  • Moin zusammen.

    Passt alles.

    Vielen Dank !

    Lieben Gruß,
    Alina

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    Geheime Information: ;)
    OuBVU5ebLhHu5QvlnAyQB4A7SzBrvWulwL7RLl2BdH5tI6sIYspeMKeXMSXl

  • Alina 14. Mai 2022 um 18:52

    Hat das Label [ gelöst ] hinzugefügt.