>Thanks for help.
>I ran set("path") and set("default") in debug. There are no changes after and before run progarm2. When I run the project step by step there is not error occurs. But when I run it as normal, the program already cannot be found.
>
>Could you please tell me how I can solve this program?
>
Before calling program1 again, check for ?File("program1.prg"); if you get a .f., it's not in the given path.
It's not enough to look for changes in Set("Path") and Set("default") after and before; you need to have breakpoints on any change on them. Just put both in the watch window and double-click the margin to the left of each, to get the red dot. Then run your code, and it will stop when either of them changes. You can also add File("program1.prg") as the third, so you could catch the exact moment when it stops being visible to VFP.