?
Solved

Config.fpw default directory config

Posted on 2011-10-30
13
Medium Priority
?
3,405 Views
Last Modified: 2012-05-12
I have an issue with a config.fpw file. Whatever i write in the DeFAULT Clause the default directory remains the same.
Can you give me some help with this

Here are the Config.fpw lines
PATH = "c:\FolderToBe"
DEFAULT = c:
RESOURCE = OFF
DATE = BRITISH
EXCLUSIVE = OFF
SECONDS = ON
ESCAPE = OFF
OPTIMIZE = ON
SEPARATOR = " "
STRICTDATE = 1
And after a display status being issued the default directory always remains the same. Please check the annexed file with the "Display Status" capture.
Kind regards
Lucilia
Gloomy.TXT
0
Comment
Question by:luciliacoelho
  • 5
  • 4
  • 3
  • +1
13 Comments
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 37055049
Try
DEFAULT = "C:\"

it needs to be between quotes.

Make sure there is no other config.fpw that is taking priority over this one.
0
 
LVL 2

Accepted Solution

by:
jsrebnik earned 1500 total points
ID: 37057562
From the txt file it looks like you're starting VFP from the Windows Start menu.  Captain Cyril is correct about putting the default directory in quotes.  You can also put the config.fpw file in another folder ("C:\MyFolder") if you'd like and start VFP with a shortcut like

"C:\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 9\VFP9.EXE" - cc:\myfolder\config.fpw

Your choice.
0
 

Author Comment

by:luciliacoelho
ID: 37057901
Thanks for you help. And within a project before I compile and create the project how I can define which will be the config.gpw the executable will use.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 27

Expert Comment

by:CaptainCyril
ID: 37058910
The config.fpw should be build in the project along with the exe. If you are running the exe on the client's computer it won't look in the original FoxPro development directory.

On your computer you are launching Development Version of FoxPro so it is loading the config.fpw in the vfp.exe folder.
0
 
LVL 30

Expert Comment

by:Olaf Doschke
ID: 37060959
An exe always will search for a file config.fpw right beside it in the same folder.

You can also always define what config.fpw an exe will use by calling it with -c parameter: your.exe -cD:\somefolder\somepath\config.fpw

Without any space between -c and the path to the config.fpw.

You can also name the file as you like via the -c parameter.

Actually you don't need it at all, as you can also put ll the settings into your main.prg. Everything you put into the config file can be changed. For some things that may make sense, for other setting you probably don't want anyone to be able to change it, eg for EXCLUSIVE, so you better code that into the main.prg

Bye, Olaf.
0
 

Author Comment

by:luciliacoelho
ID: 37159187
Dear all,
Thanks very much for your help. Light is out coming from your feed backs, altough I have a pending issue, the default directory.
The link I use to call Visual Fox is parametrized as follows:

"C:\Program Files (x86)\Microsoft Visual FoxPro 9\vfp9.exe" -cC:\CliniCAre\_outros\config.txt

The config.fpw was renamed as a text file and it's attached on this message.
And the resulting disp status output is also in a attches file MyDispStat.txt
config.txt
0
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 37159270
Try using config.fpw not config.txt.
0
 
LVL 27

Expert Comment

by:CaptainCyril
ID: 37159273
Also make sure the extension is fpw since you might have extensions hidden in Windows.
0
 

Author Comment

by:luciliacoelho
ID: 37162852
I have tried files with both extensions with the same result, the deafault drive doesn't change
0
 

Author Comment

by:luciliacoelho
ID: 37401993
Can anyone add something to my last post?

0
 
LVL 30

Expert Comment

by:Olaf Doschke
ID: 37407736
MyDispStat.txt shows, that the config is found and in effect, as the PATH setting is changed (File search path: C:\MYWORKINGFOLDER)

To see why DEFAULT = "C:" does not work, try this at the command line, after starting VFP:

? CurDir()

It will most probably display C:\PROGRAM FILES (X86)\MICROSOFT VISUAL FOXPRO 9

Now do this
SET DEFAULT TO C:

? CurDir()

See? The directory didn't change. The same happens with the config.

now SET DEFAULT TO C:\ and ? CurDir()

See?

I can't tell you why it's not working without a backslash, but you only have a path with a backslash, otherwise you just have specified the drive letter, and that makes VFP keep the current directory unchanged.

Bye, Olaf.
0
 
LVL 30

Expert Comment

by:Olaf Doschke
ID: 37407746
The essence: You can simply try to do all the stuff you set in the config.fpw at the command line (of course transposed into SET xyz TO ... instead of xyz = ...) and see if and how it works. Then you don't need to puzzle what's the fault.

Bye, Olaf.
0
 

Author Closing Comment

by:luciliacoelho
ID: 37518692
The proposed solutuions did not work in terms of default directory configuration
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Microsoft Visual FoxPro (short VFP) is a programming language with it’s own IDE and database, ranking somewhat between Access and VB.NET + SQL Server (Express). Product Description: http://msdn.microsoft.com/en-us/vfoxpro/default.aspx (http://msd…
Often times it's very very easy to extend a volume on a Linux instance in AWS, but impossible to shrink it. I wanted to contribute to the experts-exchange community a way of providing a procedure that works on an AWS instance. It can also be used on…
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses
Course of the Month15 days, 11 hours left to enroll

850 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question