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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

impact of running VFP9 sp2 from external drive

Status
Not open for further replies.

Nifrabar

Programmer
Mar 16, 2003
1,343
NL
Hi!
Having several PC's I have copied all VFP files together with my projects on an external drive. Yes, I know certain files should be registered but by just copying the dll's in the default dir's it can be done without registering.

That always worked fine with Windows XP.
Now, doing same using Win7 machine some strange happens.
In a projecthook, part of build-proces, I create a zipfile, including fresh SDT files together with DBC. Zipping requires to remove the active dbc temporarily from the project.
I use therefore command:
_VFP.ActiveProject.Files(lcFile).Remove() whereas lcFile is the DBC.
With win7 it generates error message : Member FILES does not evaluate to an object.
Typing in in the command window: ? _vfp.ActiveProject.Name gives expected result whereas typing in _VFP.ActiveProject.Files(lcFile).Remove() results in mentioned error. Note that for test I gave lcFile value [with fullpath] of : "E:\vfp\projects\prive\code\test.prg"


Any workaround so I can continue using VFP on external drive?

TIA
-Bartt
 
What's different with win7 is several system dirs are protected and/or virtualised, but this isn't a problem for a path like E:\vfp\projects...
I think you will find the reason for the errors, it doesn't look like win7 related.

"Member FILES does not evaluate to an object." occurs, if the pjx is not loaded in the project manager or another project has focus. Lookout if _VFP.ActiveProject is type object and _VFP.ActiveProject.Name is the pjx you expect it to be.

Bye, Olaf.
 
Also, it would be wise to change the default setting of EXCLUSIVE to OFF and then you don't need to exclude the dbc from the porject to be able to zip it.

Bye, Olaf.
 
The latter sounds very usefull!
Going to give that a try and will inform about results.
Thanks
-Bart
 
The bad thing about it is, the defaults are stored in the registry and so this may not work with VFP on a stick. But you can SET EXCLUSIVE OFF in your project hook, that should do it.

Bye, Olaf.
 
To be more specific: SET EXCLUSIVE OFF in the init of your project hook.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top