Path settings in Environment Manager

I cannot get foxpro to save the path settings in the Environment Manager, every time I exit out and return the path is gone.

Any ideas?

[137 byte] By [DonHiggins] at [2008-2-12]
# 1
I would wonder whether you have read write permissions on the envmgr.dbf Here's some code that will make it faster for you to find the file and check what it contains...


#DEFINE CSIDL_APPDATA 0x001a
LOCAL lcFolderPath, lcAppData
lcFolderPath = space(255)

DECLARE SHORT SHGetFolderPath IN SHFolder.dll ;
INTEGER hwndOwner, INTEGER nFolder, INTEGER hToken, ;
INTEGER dwFlags, STRING @pszPath

SHGetFolderPath(0, CSIDL_APPDATA, 0, 0, @lcFolderPath)

lcAppData = Alltrim(lcFolderPath)

lcAppData = ADDBS(SubStr(lcAppData,1, Len(lcAppData)-1))

USE (lcAppData + "Microsoft\Visual FoxPro 9\envmgr.dbf") IN 0 SHARED
SELECT ("envmgr")
BROWSE

CraigSBoyd at 2007-9-8 > top of Msdn Tech,Visual FoxPro,Visual FoxPro General...
# 2
Craig:

That is a nice code sample but maybe a little too much work to find appdata folder.
In normal (default) installations it is in Home(7) (appdata) so you can simply do:

? File(Home(7)+"envmgr.dbf")

to see if it is installed or

USE Home(7)+"envmgr"
Browse

AlexFeldstein at 2007-9-8 > top of Msdn Tech,Visual FoxPro,Visual FoxPro General...
# 3
LOL! I think I may need to stop drinking 15 cups of coffee before noon at this end... seemed like a reasonable amount of code at the time. I just read a post by Tamar over on tek-tips that included Home(7) in it and thought "I think maybe I should just do that from now on". <g> Thank you for posting the abbreviated version.
CraigSBoyd at 2007-9-8 > top of Msdn Tech,Visual FoxPro,Visual FoxPro General...