Here a few lines of code where I set the path using :
sys(5) Returns the current Visual FoxPro default drive.
sys(2003) Returns the name of the current directory on the default drive.
gcpathexecnavwordpro = SYS(5)+SYS(2003)+"\"
IF !FILE(gcpathexecnavwordpro+"debug.txt")
_SCREEN.VISIBLE = .F.
ENDIF
SET CLASSLIB TO gcpathexecnavwordpro+"Libs\NavWordPro" ADDITIVE
On the desktop of my user I set a shortcut with the right properties for the path:
Target : "C:\Program Files\Microsoft Visual Studio\Vfp98\VFP6.EXE"
Start in : d:\bao_w\navwordpro
for another user I can put my program on drive H: and change the shortcut to reflect the change
Start in : H:\bao_w\navwordpro
This way I can change drive and directory anytime without touching a line of code.
If I move the application on a user machine from d:\bao\myapp to g:\test\ddc\myapp I just make the change on the shortcut on desktop of my user.
Michel
>OK, I'm running into a couple of issues with paths. The first is that I've tried setting my path: SET PATH TO "C:\projectname,C:\projectname\data,C:\projectname\forms,C:\proj..." in numerous places such as in the code that I set as main, in options from the designer window, and in form inits.
>
>Regardless, when something is called from the C:\projectname\reports folder (or forms, menus,...) the program can't find it.
>
>The second issue is that this program is intended for multiuser use, and I can't visualize how these paths are going to be manipulated when installed. IOW, what if they are installed on drive D:? I've already hardcoded the paths to be drive C:\whatever.
>
>I've started researching these issues in the msdn online help, but would appreciate a professional's point of view.
>
>Rodney
Previous
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only