>5. Can anyone confirm with me that, if VFP9 is startup by double-click a scx or prg file, the "COMMAND=" line (if exist) in the FPW file will be run? My VFP9 is strange... I try to wipe everything in the VFP9.FPW as mentioned and only leave one line in it, that reads "COMMAND=MESSAGEBOX([I am run])"
>Again, if I start VFP normally, I am prompted "I am run" but I I start VFP by double click a prg or scx file, there is NO "I am run"...
It's more a matter of what's your .cfg file - the foxprowcfg environment variable is mentioned in just one place in help, and it doesn't seem to mean much, "Optimizing Visual FoxPro Startup Speed" only says "You can use the environment variable FOXPROWCFG to explicitly specify the location of Config.fpw. For details about the FOXPROWCFG variable, see Customizing the Visual FoxPro Environment.", but when you go there, it doesn't say a word about it. So maybe VFP doesn't use the variable anymore.
IMO, I think your config.fpw is not read at all if VFP is run from a different directory (which it is if you doubleclick an .scx or .dbf). You can check sys(2019) in both cases.
You may just be better off by calling your file config.fpw - that seems to work even if I open VFP via doubleclicking a file. Alternately, you may go to registry and edit the open command for such files to include the -c switch.