The problem can be solved in two ways:
- Turn off the sleep/hibernate in windows.
- Control panel
- Power options
- Put computer to sleep never.
This is an easy fix but it is impossible to ensure that the users do this, and when they run into this problem it's already to late.
- Make sure the application tells windows it is going to run a long process, and that the user needs to wait for it to complete.
See Stack Overflow question. http://stackoverflow.com/questions/629240/prevent-windows-from-going-into-sleep-when-my-program-is-running
On XP See: WM_POWERBROADCAST
On Vista and Windows 7 See: SetThreadExecutionState
This is the path I think is correct by telling the operating system what the application is doing it supports the application and user does not have to do anything to get the correct behavior when logging or uploading software to the system.