Run process problem

About Monkey 2 Forums Monkey 2 Programming Help Run process problem

This topic contains 3 replies, has 3 voices, and was last updated by  nerobot 2 years, 1 month ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #7282

    Hezkore
    Participant

    I have this weird problem where if I run a process via the Process class, it never works if I run the app from Ted2.
    I have to go into the “products/Windows” folder and run the app in order for it to work.

    For example, I use “wget.exe” to download images from a map.
    It works great if I run the app myself from the folder, but if I launch it from Ted2 it just errors out.

    I don’t know what “Code1” means btw.
    That error code comes from std.process and there’s no documentation on the error code.

    UPDATE:
    Through some snooping I noticed that the paths aren’t correctly set by Ted2.

    #7284

    Danilo
    Participant

    Did you try to change the current directory to your app directory at start?
    Do you just call “wget.exe” or “AppDir\wget.exe” (full path)?

    #7285

    Hezkore
    Participant

    I’ve tried a lot of things…
    Print AppDir()+”wget.exe” spits out “G:/Projects/Monkey 2/gw2map2/main.products/Windows/wget.exe” which is correct.
    But even if I start the process via AppDir()+”wget.exe” I get the error.

    #7294

    nerobot
    Participant

    Is your command looks like this:

    And do you start process inside of new Fiber?

Viewing 4 posts - 1 through 4 (of 4 total)

You must be logged in to reply to this topic.