>>>Has anyone seen this weird phenomena? Certain PC's thruout this place of employment when running several apps say upon startup
>>>"Cannot read from drive D". So I put any available CD into the cd-rom drive and run again and it works. Crazy eh?
>>
>>1)It may be that you have a d: in your search path
>>Before running app check your environment (i.e. go to dos prompt and type "path"). If a reference to d: is there, then check your autoexec.bat .
>>
>>or
>>
>>2)Your foxpro resource file might have a reference to d:, try adding "RESOURCE=OFF" to your config.fpw
>
>In the 2nd example, how do I modify the resource when the app is distributed thruout my building on many PC's?
You may be able to get away with leaving resource off. If not what I do is make a copy of a valid resource file and include it in the project as,say,
USERRESO.DBF (&FPT)
then leave RESO=OFF in the CONFIG.FPW and upon startup something like
IF NOT FILE('C:\USERRESO.DBF')
USE USERRESO.DBF
COPY TO C:\USERRESO.DBF
ENDIF
SET RESO TO C:\USERRESO
SET RESO ON
If you want to tie the resource files to an individual user you can do the same but keep a dbf with the user names and resource file names. Maybe something like SYSINFO.DBF=USERNAME C(8), RESOFILE C(20)
*CODE TO GET AND VALIDATE USER
IF NOT FILE(TRIM(SYSINFO.RESOFILE))
USE USERRESO.DBF
COPY TO (SYSINFO.RESOFILE)
ENDIF
SET RESO TO (SYSINFO.RESOFILE)
SET RESO ON