Jawade wrote:I have a strange thing. A graphical program has a pause of 1 second before it opens. But after I write to it, the pause of 1 second is no more there.
The only software I have like that is Security Essentials. But I don't believe that kind of software is the cause.
As others have mentioned, it's most likely to be your antimalware/antivirus tools. What might be happening is:
- When the AV stuff detects an "unknown" executable, it scans the code - which takes that "1 second", and which might involve internet lookups also).
- "Unknown" might mean - a new file, a different filename, different size, different timestamp, or even a different checksum.
- This should mean that the delay occurs only on the very first execution of the file, after it was last compiled or changed.
- Your code to apply that "M" probably changes nothing - in which case a checksum of the file would not show changes. Maybe change it to some other char - just for a test. And observe if the "M" update changes the timestamp on the file.
Regarding SE, why not just temporarily disable your AV stuff, re-compile the EXEs, and then see if the first execution (after the compile, or after changing the EXE) has the pause. (And then, re-enable the AV utils!). It probably will not have the pause - assuming A-L-L your AV stuff is disabled! Or you might be able to configure the AV apps to ignore those specific EXEs.
If it's the AV apps, then that delay of several hours would be irrelevant: the 1-sec pause should occur on the first execution after the compile (or change), and that pause should apply whether that first execution was only a few seconds, or many years, after the previous compilation/change.
The link from JJ2007 discusses special treatment of executable filenames with terms: patch, setup, install, update.
- Mike