While compiling my VC++ MFC project I am getting the below error.
"Fatal error C1083: Cannot open compiler intermediate file: 'C:\temp\a09912sy': Permission denied".
Some times this error was coming sometime not. I have tried to change the "TMP" and "TEMP" environment variable as mentioned in the various forms.
Later I found that this problem caused by a too aggressive antivirus software. The problem here is while compiling the VC++ project, it is creating some temporary files in C:\temp(TMP environment variable) directory and those files are getting delected my VC++ once compilation done. Mcafee "On Acess virus scanning" scans all temp files under that C:\temp directory.
So I have changed the properties of "On Access Virus Scanning" in Mcafee and then after I didn't get that error.
So I want to know why this dependancy is there. Why this error is coming some times only not always.
Ok is this Mcafee home version I ask as you appear to be saying you deselected scanning of the temp folder by the on access scanner. Was this what you were talking about. If so that option is not on the home version so I assume you have an enterprise version maybe. If so I will move the post to the correct forum.
If I am incorrect can you explain what you did to get it to work?
thanks for you replay.
Yes I am using Mcafee enterprize edition 8.8.0. Please move this question to that fourm
Will do moving now
This question seemed vaguely familiar. William Warren and I spoke to this question at length here:
Though this original question was posed during VSE v8.7 (pre v8.8), almost all of the discussion still applies today.
I would Strongly Advise Against excluding %TEMP% as many malware programs that install (without your permission) use this directory to launch. Instead I would configure C++ to use a subdirectory of temp and exclude just that subdirectory (including it's subdirectories).
Performance Optimization is an art. However, several tools exist which may help in isolating performance problems specific to Your environment.
You could start with Microsoft/Sysinterals' Process Monitor which should help you isolate many of the repeated actions causing performance issues. This is however, fairly generic in that it shows all of what is happening and may include areas that you want to continue to monitor for security reasons.
William Warren wrote:
You can expect significant return in performance by disabling Buffer Overflow Protection and Access Protection features (requires Patch 2 or later to be installed).
Further tunning using low risk is possible, and you might find some key file/folder exclusions help too.
An area of overhead that can't be avoided though is our mfehidk.sys driver's functionality in tracking processes. And in a build environment you have many, many, many short-lived processes - or rather, the same processes being spawned hundreds or thousands of times in the course of the build. As always, multiply a tiny amount of overhead for a single action by hundreds or thousands of repetitions in a short amount of time, and that tiny amount of overhead becomes very noticeable.
It's something to look for improvements on in future releases of the product.
Based on your problem description, I would suspect that files are created and deleted (as William suggests) thousands of times per second. If McShield (or McAfee in general) doesn't release a file fast enough, VC++ may report an error as that file is locked. It's timing sensitive, so you may get highly varied results.
My suggestion is to create a subdirectory of %TEMP% (or %TMP%) which you configure VC++ to utilize. Then exclude just this Subdirectory within VSE. Also, consider configuring High Risk/Low Risk Processes and make VC++ a low risk process.
Let us know if this helps.
Thanks for your reply..
I think we don't have any access to change the default directory of VC++. Do you have any idea how to change the directory..?
Though I don't have VC++ development installed on my system, I found some info:
Select Tools > Options > Text Editor > C/C++ > Advanced. Once there, you'll see a Fallback Location section. Change Always Use Fallback Location to True. Set the Fallback Location. They will be recreated in the fall-back location.
Visual C++ Projects
To change the build output directory:
And of course, clean up the temp directories if you can.
Again, the High/Low Risk Process change in VSE will allow VC++ to run without VSE so aggressively interferring.
Beyond this, I am out of ideas.
I didn't find any fall back settings on Visual studio 6.0. Can you please tell me how to change this seetings in VS 6.0. The above setting I found in VS 2010 not in VS6.0
Well, then I think you are left with configuring and using the High/Low Risk Processes in order to minimize the McAfee interference.VS6.0.
Search the KnowledgeBase for KB55139,
This is a pretty good description "Understanding High-Risk, Low-Risk, and Default processes configuration and usage"
There is a Video Tutorial (which require Adobe Flash) which may help with the understanding of how to customize to your liking.
Finally, check out this discussion by Attila Polinger: https://community.mcafee.com/message/292594#292594
Welcome to the Art of Performance Tuning vs. Good Security.