Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VFP 9 Config problem 1

Status
Not open for further replies.

Paco75

Programmer
Oct 11, 2001
239
0
0
US
Hi,

Im having some troubles with VFP 9 setup... each time i open a project the windows state is not kept in memory and it always opens in a small windows instead of maximised. Also the size and locations of the project manager and property windows are always reset. Is there a place in config to tell VFP to keep these in memory?

Also i got Option->View->Open Last Project on Startup disabled... i cant check/uncheck it!! The only way i got to change it is to go in registery and set the value manually.

thanks
 
Oh and i forgot to mention that i uninstalled/reinstalled VFP.
 
Another thing you forgot to mention was which Windows OS did you install into?

That could possibly be a contributing factor in your issue.

Good Luck,
JRB-Bldr
 
Hi,

Have you already deleted all foxusers.dbf from your pc?
Quit VFP and search with Windows for Fosusers.* delete all Foxusers.dbf and .fpt

Regards,

Jockey(2)
 
i just deleted them and the problem is still there
 
Windows 7 Ultimate edition

That's sort of what I suspected.

You do know that Win7 has some very unique 'features' that can complicate software installations, don't you?

One of those 'features' is to use 'sandbox' directories which are deleted when the user logs out of their Windows session.

That's what it sounds like you are encountering.

If your VFP Resource file were being installed into a 'sandbox' directory it might work as expected during the current Windows login session.

But once you logged out, that Resource file would be removed from the system and along with that all of your previous saved settings would also be gone.

Rather than repeating what has already been discussed in other postings, do a Search in this forum for:
Win7
or
Windows7
or
Windows 7
and you will see what has been discussed towards getting a stable VFP installation under Win7.

Good Luck,
JRB-Bldr

 
Paco,

Just to follow up JRB's point .....

Given that you have already re-installed VFP once, an easy solution to the "sandbox" problem would be to do so again. But this time, install it in its own directory directly below the root, not in Program Files.

I suggest you try that before you try anything else.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
Just as an aside: reinstalling VFP almost NEVER solves ANYTHING.

Unless you've been attacked by a virus or malicious user who has deleted important files, you'll get the same files on a reinstall you already had before the reinstall. Neither a virus nor a malicious user is likely to only attack VFP, so unless you're having general problems, reinstalling VFP just isn't sane troubleshooting.

Run VFP as an administrator (right click, Run As) and see if that disabled checkbox on the options dialog suddenly becomes enabled. That will totally confirm that you're a victim of Win7's virtualization (or sandboxing).

 
In the options dialog you need to click the Set As Default button to make a change permanent. But both registry virtualisation and group policies can make these changes reset. At a customer I have limited rights thi is done each day, so I can set options for a day and need to repeat the next day, if I work there. And that is not even Win7 but just Vista, but "sandboxing" or officially file and registry virtualisation started there.

Reinstalling actually does solve problems on the file level, but registry is registry and I think is not affected a bit by a deinstall/reinstall, that's why I agree in the end, a new installation does help almost never.

I tend to work with Window->Arrange All and nondocking windows, Others rather dock command and property window together, there was a lengthy thread about how to hide the command window at start recently, you may find additional ideas how to configure the IDE there.

thread184-1659510

Bye, Olaf.

 
Is there an echo in here? ;-)

Note that clicking "Save as default" in the options dialog will not help when a checkbox is disabled and therefore can't be clicked, which is what was described in this thread.

If all you need is to restore VFP's default settings, run vfp.exe with the /regserver switch. (Or /unregserver to remove the default keys.)

If you're making settings daily, I hope you're at least exporting a .REG file with the necessary settings so you can restore them with one double-click every morning.
 
I tried the reinstall thing with the 'sandbox', did not worked.

I launched vfp as administrator and the checkbox was no more greyed... i unchecked the option and did save as default but when i run it back in standard mode (non-admin) the checkbox is greyed again.

I tried to launch vfp9.exe /regserver but i get the warning "Access to system registery denied"...
 
You'll need to always start VFP as Admin. You can set this up permanently in the properties of the Start menu entry for Foxpro.

What you see can best be explained by Windows seperate Registry branches for each user, and what you can do as Admin doesn't change the settings of your normal account.

Installation directory doesn't change the registry handling, that's what I also said in advance.

Bye, Olaf.
 
I tried the reinstall thing with the 'sandbox'

First-off, the 'sandbox' thing is also known as 'virtualization' - the term Olaf used above.

That means that Win7 will let you do whatever you want to do in a session, but when your session is done, it will throw it away. Just like wiping the 'sandbox' clean for the next user.

So are you saying that you intentionally reinstalled VFP in the 'sandbox' mode?
If so, that is exactly what you DO NOT want to do.
And to do the install/re-install properly you have to have Administrator rights to the workstation.

Also you need to be sure that you install VFP into Win7 directories that will allow the changes to be made and also be kept - many directories will not.

In addition to following the good advice above, you may want to look at Rick Strahl's posting regarding Vista (its applicable to Win7 also):
A side note - some of the previous postings about Win7 installations mention 'aggressive' anti-virus programs causing problems. You might also want to check for that as well.

Good Luck,
JRB-Bldr
 
jrbbldr,

sandbox is the wrong term, if you mainly understand it as temporary space. Virtualised Files, more specific the VirtualStore folder, is permanently storing things intead of storing at the original place.

The virtual comes from a virtualisation of the place, not as in virtual memory, which is volatile, mostly.

The mechniasm is: An app writes to eg C:\Program Files\Someapp\somefile.ext, which Windows forbids and redirects to C:\Users\username\AppData\Local\VirtualStore\Program Files\Someapp\somefile.ext instead, but more than that, also if a progrtam reads back from C:\Program Files\Someapp\somefile.ext windows redirects the read to C:\Users\username\AppData\Local\VirtualStore\Program Files\Someapp\somefile.ext again. Oh, and what matters is not, wh#o is logged in, but under which account the app runs, so running vfp as admin would presumably store files in C:\Users\Administrator\AppData\Local\VirtualStore\Program Files\Microsoft Visual Foxpro 9\... in regard of files in the VFP Home() folder. And another part would be in the parallel folder of your normal account.

The result of this virtualisation in general is, the app sees no difference to writing and reading in the place it intended to write/read. The downside is, despite Program Files being a single folder for all users, virtualisation is done per user, because of the VirtualStore being present for each user (see above for it's location). So two users in general will have differences in \Program Files\ or other protected system folders. So while this mechanism should redirect both reads and writes and make no difference, it introduces a problem, if using some application via different accounts.

Installing VFP outside of such a protected system folder solves the problem on the file level, but there is no such alternative for the registry and settings/options are stored in the registry.

Forget about the sandbox terminology, that only comes into play, if you talk about Internet Explorers Protected Mode and also is a consequence of UAC, but is not what VFP does or experiences.

The problem with options is surely NOT a file problem, it's a registry problem. Looking into Registry Virtualisation I only find HKEY_LOCAL_MACHINE keys are virtualised and not HKEY_CURRENT_USER, where Foxpro stores it's options, so I assume it must be something else. What I know is, that on top of Registry Virtualisation there is a 32bit vs 64bit Registry.

More on the Registry topics here:




Bye, Olaf.
 
Paco, as I mentioned earlier: If you are prepared to go to the trouble of reinstalling VFP, install it in a directory immediately below the root of your drive. That way, you can avoid the virtualisation problem.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
that's what i did.

installed in c:\vfp but it was still same problem.

I reinstalled windows in a clean install and reinstalled vfp9 and problem is still there... i really dont get it. Could it be the project file that has been corrupted? Does the projects file keeps info about vfp config and display?
 
Could it be the project file that has been corrupted?

Do other projects and their windows behave the same way?
If you have not tried that do so now.

Does the projects file keeps info about vfp config and display?

That information, like occurs with Browse windows, PRG edit windows, Form edit windows, etc., is stored in the Resource file.

To find out if SET RESOURCE is ON, do a:
?SET('RESOURCE')
Then to find out where the Resource file is 'living', do a:
?SYS(2005)

Good Luck,
JRB-Bldr
 
Hang on. Let's go back to the beginning.

Paco, you say that the "project state" always opens in "small windows" rather than maximised. What type of windows are we talking about?

If you are referring to things like code editing windows, then I'm afraid you're wasting your time. In general, VFP remembers the size and position of these windows between sessions, but not their maximised state.

This has been the subject of several threads here over the years. I personally find it very annoying, but I've got into the habit of hitting CTRL+F10 as soon as I open an editing window, which is the best workaround for the problem.

If I've misunderstood the problem, perhaps you could explain exactly what type of windows you are talking about.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
For the third time: It's how Windows handles the registry, you know yourself the settings are in the registry. Try turing off UAC for a moment to see it's just this and no corruption of your system of VFP.

Bye, Olaf.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top