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

Windows 7 Deletes my Programs

Status
Not open for further replies.

buddyrich2

Technical User
Apr 12, 2006
87
US
I am a VFP9 user and recently upgrades to Windows 7. Everything worked fine for about 3-4 months (I was worried that it wouldn't work well under 64bit but it seemed to do fine).

All of a sudden, most every time I either try to compile or save a program, I get a 'file access is denied' error and my program (.prg) is deleted. To restore I have to change the suffix of by .bak file to .prg but none of my changes are saved.

I think this is a a Win 7 problem because this never happened before.

Anyone have any ideas?
 
This is definitely not a Windows 7 issue. It sounds like an overly aggressive anti-virus program.

Doug
 
Well, I'll try to stop all the AV programs and try it, but it doesn't make sense. Nothing gets deleted 'on its own'. Its only when I try to compile or save VFP programs.

Something must have changed at some point. Could this be a security or permissions issue?
 
I'm guessing it's UAC in Windows 7. You can't place stuff in the WIndows or Program Files folders. Make sure you aren't trying to build in either of those.

Craig Berntson
MCSD, Visual C# MVP,
 
Even if it was UAC, the question still remains: what has changed? If it hasn't kicked in for several months, it's unlikely it's the reason. There would be the need for a change, either UAC was turned on, maybe indirect through a new virus scanner, or projects moved.

The question what has changed is the central question, no matter if it's hardware, software, project location, settings. And there are things that change, every day. It's hard to find out what was the change.

SP1 of Win7 has been around since february, if that woudl have been a recent update it could have caused a change of UAC for example.

If you question the OS, the easiest step you could do is test with a different OS, eg in a virtual PC or an anther computer. Then you'd see if it's the OS or perhaps a corrupt project.

Investigate, there is no other way to find out.

I can only second Doug in that respect, that I haven't seen that behaviour on Win7. But you're line of arguments is too simple, if you say you don't know that behaviour of Fox, so it must be the OS. Anti virus is a process watching all file accesses, indexing files is another one, there are surely more, some part of the OS, some part of third party vendors.

Bye, Olaf.
 
Buddyrich, I can only echo the good advice you've already been given.

In these circumstances, you really need to systematically eliminate the variables. For example:

- Does the problem only occur with a particular PRG? Try reproducing the behaviour using a different PRG.

- Does it only occur on a particular computer? Try running it on another Windows 7 computer.

- Are you sure it's Windows 7 that's causing the problem? Try running on an XP machine, or the same machine as at present in an XP virtual machine.

- Could it be a VFP problem? Try running it with a different version of VFP if possible, or a fresh install of VFP on a different machine (or the same physical machine but under a virtual machine).

And so on.

You see the point? Keep eliminating these variable until the problem goes away. When it does, that will give you a strong clue as to the cause.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
What folder are your project files in? If they're in a protected location like C:\Program Files, you may be running into Windows virtualization. Try moving the files to a different, writable folder and see if that makes a difference.

Doug
 
I wonder if Buddyrich has his HDD partitioned? If so - I'd move everything (development stuff, docs, everything) onto the D: drive and leave C: as a system disk only. Win7, IMHO, is even more user-hostile (especially - Pro version) than WinXP SP3 had been.
Also, I would set the Config.FPW in the \ProgramFiles\MS VFP9 subdir to point onto that D: drive for everything (besides some other things, i.e. MVCount=64000, etc.)
HTH.

Regards,

Ilya
 
Hmmmm... I may try that. I forgot about the config.fpw file. Maybe the clue is in there.

God knows I've tried everything else, and as you can imagine, this is driving me NUTS. Can't get anything done.
 
Buddyrich,

Sorry to labour the point, but it would really help if you could follow the advice in my previous post and start eliminating the variables. If you could discover whether the problem lies in Windows 7, VFP, the computer, or whatever, we'd be on our way to finding the solution.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips, training, consultancy
 
This happened to me few times. (Maybe 4, 5 times). On Windows XP, and recently on Windows 7. This happens to my class library (vcx). It deletes vcx file and creates a copy with extension .tmp.
 
jureczek, have you found a solution? I now have to do all my work on my laptop because of this problem. Very frustrated.
 
Again....

That is symptomatic of UAC preventing you from saving a file in the location you're trying to save files. If you are trying to save files anywhere within %ProgramFiles% you will likely have this problem. You should use a location inside %UserProfile% instead.

Where are you trying to save files?
 
I've tried everything. I've turned UAC off. I've created a separate directory for temporary files and then directed VFP to use that directory. I've used DOS to make sure none of the directories are Read-Only (its hard to tell with Explorer).

The name of the directory I'm saving to does not matter and BTW, its not "Programs Files" or any other directory commonly used by
Windows.

I've turned off virus protection, deleted my registry mechanic, and turned off my malware protection.

Program continues to work fine on Vista.

I still think it some type of record-locking or permissions problem but can't isolate it.

 
If you edit VCX classes or SCX forms, those are really tables, you can USE some.scx or some.vcx and see for yourself. That being so, VFP does PACK the data it saves when you save a change, so you get those tmp files as temporary files, while VFP packs the vcx, that would end as vcx again, if there was nothing interrupting the process.

We may be back to the suspicion, a virus scanner is interrupting VFP and causing that trouble.

Are both of you perhaps using the same virus scanner?

With juriczek reporting an at least quite similar problem occurring on XP, I'd say Windows 7 is clear of suspicion.

Bye, Olaf.
 
I'm using McAffee virus scanner and PC Tools Spyware Doctor for malware protection. I also have PC Tools Registry Mechanic to scan for registry errors.
 
I will ask this one more time:

WHERE EXACTLY ARE YOU SAVING FILES?

Please, really, you keep ruling it out but it's the one variable you haven't yet ruled out. You just claim "it isn't the problem" and yet you're still having a problem.

Humor us. We're trying to help but you're working against us.
 
I made a directory directly off my c:\ drive called "enrollment". So the files are saved in C:\enrollment.

I didn't think the actual name of directory mattered. Sorry.
 
OK, that should be safe. BUT WE DIDN'T KNOW THAT UNTIL NOW. Thank you.

Are you using any of the FFC classes (or other classes or programs that ship with VFP)?

Is EVERY file being saved in c:\enrollment? (*That* is something we can all test!)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top