Bought a new computer a couple months ago and its nagged me since, that about half the time after the machine goes to sleep, it immediately wakes up. Windows 10. I've "solved" this so far, by holding the power button down until power is removed and that makes the machine quiet and without lights, but a better answer is to figure out why this thing is waking up immediately after sleeping. The diagnosis and fix are detailed below.
Amoung the jobs of an operating system is to maintain the disk file system including the directory structure, file names and for each file, the file size and the pertitent date information for when the file was created, modified and potentially accessed. I have been editing some videos lately and after producing a MP4 using ffmpeg; I used PowerShell to set the file create and modified times to the date that the video was recorded. This makes it easier to sort and allows viewing software to display timelines, good things. MP4 files also have an internal date that is set by cameras to note the datetime of when the video was recorded. I was surprised to learn that Windows Explorer displays the MP4 date rather than the file date and this can be problematic if the MP4 file does not contain valid date data. This post describes the issue in detail and provides steps for adjusting all the dates to the same datetime.
When Windows 10 starts and users logon, the operating system by default will automatically restart all the applications that were running when the system was rebooted including launching them to reload the documents and revisit web browser URLs. Handy in concept this is not how I want the machine to behave. I would like a clean desktop, that looks the same everytime the machine boots. Thankfully, there's a setting for this, not well advertised, but it does exit.
The DOS world's need for memory grew and the 64KB available to .COM executables was no longer adequate. The NE "new executable" executable file format was invented and uses the .EXE file extension rather than .COM. The first 2 bytes of these files includes a tag at the front to identify the format and if you guessed that this was "NE" to denote "new executable", you'd be incorrect. The first 2 bytes of every .EXE file are "MZ" famously because the name of the programmer at Microsoft who wrote the code was "Mark Zbikowski".
In the beginning, the DOS .COM file format was the format for executables of size less than 64KB and let's face it, who would really need more. I'm headed down a path to discuss PE file format executables and no good discussion is right without a foundation. In the beginning, there was DOS; life was simple and there was nothing between you and the computer. This post describes the early executable .COM file format showing code, data, everything that you need for small executables!