Are they being protected by Windows File Protection?
Sorry, to clarify - is mscorlib.dll being protected by WFP? This could explain this behavior.
Joseph: *gulp* silly me. It is indeed WFP that is restoring that file automatically out of System32\dllCache.
There's a great article that describes what WFP is and how to configure it.
Thanks for the heads up!
Are you sure it's WFP that's restoring the file, as that usually kicks in straight away (if you sit and watch the the folder the file comes back).
It could be the msi based installation repairing itself.
You are all wrong. It is little elves.
Elves? No - The CLR loves you Roy, and wants you to be happy.
If it was WFP then presumably this would repair NET1.0 as well since WFP is a core Windows service?
I don't know if mscorlib.dll is protected by WFP, but either you are seeing WFP kicking in or it is Windows Installer that repairs your installation.
Windows Installer is actually quite amazing in that respect, but being a developer I have been bitten by this behaviour a few times. I remember once where we were in the late testing phases and all our software was installed by Windows Installer as we would ship it. The testers found a bug and to in order to fix it I had to create a special instrumented DLL. I was in a hurry so instead of building a new installer I stuffed the new DLL on a floppy, whizzed into the test lab, dragged the new DLL on top of the old one in Explorer and started the app when, doooh... Windows Installer started and "repaired" my application overwriting my instrumented DLL with the original DLL. In theory I knew that this would happen, but seeing the "magic" being done at a stressed moment was a fun experience since it was both nice and annoying at the same time. Actually, we could delete the complete app, and as long as the shortcut was in place Windows Installer would install and repair the application. The app was off course published using AD so the shortcut was always there. Windows Installer is your friend.
I demoed this functionality (WFP) with Guy Barrette at DevDays 99 here in Montreal.
We had tried the demo a couple times with notepad.exe.
When we got on stage to do the demo, the file was getting restored so fast that it seemed as though we were not really saying ok to the delete file prompt.
So we started deleting other files ... people were impressed. :)
It does not work!!
i got the following error (my program was compiled for debug!!)
The error message was
Failed to delay load library mscorb.dll (Win32 error: 2)
This program can no longer run and will now terminate
PS:
Btw i used to work with Addy Santo!!
Well, I've been everywhere on this and i really need help. I keep getting this message: