How to set up Perl run tool?

How to set up Perl run tool?


    Dec 30, 2022#1


    I've searched the forums but didn't find an answer.

    UltraEdit 2022.1.0.124 64-bit
    Windows 10 Home 21H2

    I want to set up a tool entry for starting an edited Perl script from UltraEdit. I've read the help files. Because I've bought/installed UE in German, I only can give German dialogs.

    Navigation path is: Extras >> Benutzerwerkzeuge >> Werkzeuge konfigurieren (Advanced >> User tools >> Configure tools)

    I have input:

    Tab Befehl (Command)

    Perl Run '1'
    d:\sperl\perl\bin\perl.exe "%f"

    Tab Optionen (Options)

    (*) DOS-Programm
    [X] Aktive Datei erst speichern

    Tab Ausgabe (Output)

    (*) Ausgabe in Listenfeld
    [X] Ausgabe aufzeichnen
    (*) Nicht ersetzen
    (*) ANSI

    If I start with Extras >> Benutzerwerkzeuge >> Perl Run '1',  I get the message:

    Fehler beim Erzeugen des Prozesses
    Der Verzeichnisname ist ungültig


    d:\sperl\perl\bin\perl.exe "D:\Dokumente\Prog\Perl\" ...

    May you help please or give a hint?

    Thanks in advance, Thomas

    Grand MasterGrand Master

      Dec 31, 2022#2

      The working directory must be configured with just %p without the double quotes. Everything else looks correct.

      Background information: There is called the Windows kernel library function CreateProcess with function parameter lpCurrentDirectory being a long pointer to the string with the directory path of the directory to use as current directory for the started process. The character " is not valid in a directory path as explained by Microsoft in the documentation about Naming Files, Paths, and Namespaces. UltraEdit does not remove double quotes added by the user around the working directory path. CreateProcess does also not remove the double quotes. That is also the reason why Start in directory path in a shortcut file with file extension .lnk or a scheduled task must be always configured without surrounding double quotes.
      Best regards from an UC/UE/UES for Windows user from Austria


        Dec 31, 2022#3

        Thanks, does work fine.