Hi,
Thanks for all of you who are trying to help!
I am sorry I should have described things with more detail:
1) I use "FoxProWcfg" environmental variable to tell VFP which FPW to use, and I have assigned "I:\Vfp9\Run\Vfp9\VFP9.FPW" to FoxProWcfg. So it is an absolute filespec setting.
2) The COMMAND= line in my VFP9.FPW actually reads: "COMMAND=DO i:\Vfp9\Hprg\sSysStartVFP.prg", again it is a full filespec.
3) The sSysStartVFP.prg which I expected to be launched by the .FPW reads:
#INCLUDE I:\Vfp9\INC\HCVFPATH.H
SET PROCEDURE TO
DO (pcPATHhprg + [sSysSetProc.prg])
uShowTKbar()
uIDEWinUp([GroupList], 1)
_oToolBox.Show()
_Screen._hcdf.uShowDevMode()
inside the sSysSetProc.prg, I have several lines of "SET PROCEDURE TO prg_filespec" where prg_filespec is again full filespec, e.g. "SET PROCEDURE TO (pcPATHhprg + [dSysTKitTbr.prg]) ADDITIVE". uShowTKbar and uIDEWinUp are both SET PROCEDURE TO within the sSysSetProc.
4. If I double-click a prg or scx file which starts VFP, I notice none of the codes in sSysSetProc.prg get executed. Procedures in sSysSetProc.prg are not set, my toolbar, those dock-tab all are all absent. Only a floating properties window there. So I bring up command window, issue commands and get the below:
? GETENV("FoxProWcfg") -> "I:\Vfp9\Run\Vfp9\VFP9.FPW"
? SYS(2019) -> "I:\Vfp9\Run\Vfp9\VFP9.FPW"
I think the right FPW file is used by VFP, it is just that the line "COMMAND=" in the .FPW is ignored by VFP. I know that if there are more than 1 "COMMAND=" lines in a FPW file, only the last one is run, but I only have 1 "COMMAND=" and I don't use _STARTUP at all.
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"...