* Some Windows Store reports suggest that the existing call might freeze
on CreateFile() leading some users to kill the app. So switch to using
a CreateFile() call that times out instead of waiting forever...
* Passing a non-formatting buffer as first parameter of uprintf() can lead
to an exception if this buffer happens to contain a '%' character, so
usage of uprintf() with string buffers that may contain '%' should be
sanitized.
* Also drop the _uprintf/_uprintfs aliases as they are no longer required.
* write_sector() should really only be used when writing single sectors as it
is way to slow for anything else => Switch to using WriteFileWithRetry().
* Also revert an unwarranted change from f0047986e7.
* While this is intended to solve the issue of saving GRUB/Syslinux files for the
App Store version, we apply this change globally, as it allows the user to move
the Rufus executable around while preserving access to existing downloads.
* Closes#1744
* InternetGetConnectedState() is next to useless and doesn't provide
coherent outcome on the ARM64 platform I'm testing with. This results
in Rufus declaring that Internet is unavailable on platforms that do
have actual Internet connectivity.
* Swicth to using INetworkListManager::GetConnectivity(), which actually
reports a dependable result.
* Closes#1691
* Also remove the mutex for uprintf(), which may produce thread lockout
and remove an unwanted double GetSignatureName() call on startup.
* The upcoming Ubuntu 20.04 comes with MD5 validation turned on by default.
* When creating persistent boot media, we may update some of the validated files
to add persistence, update the search labels, etc.
* Make sure that the files we modify get their MD5 updated where needed.
* Also add 'loopback.cfg' to the list of config files we can add persistence to.
* Part of #1499
* Commit 4c5adf092e moved us away from using CreateFile()
when extracting a file on the target media, and as such the error code returned when
failing to create an 'autorun.inf' due to a security solution has shifted.
* Make sure we handle the new error and don't bail out on 'autorun.inf' creation.
* Also update the actual name of the RtlDosPathNameToNtPathNameXXX function we use.
* Closes#1496
* Implement CreatePreallocatedFile() which uses NtCreateFile() to create files with preallocated sizes.
This is used during ISO extraction to improve performance.
* Remove now-unused preallocate_filesize which was called after CreateFileU().
* Closes#1445
* Remove unused iso_op_in_progress and use a single op_in_progress that gets
set when we disable the controls.
* Also fix an issue where Ctrl-L was being processed as Alt-L due yet another
completely backwards Windows behaviour where the message that is meant to
indicating whether Alt is pressed is also sometimes used to indicate that
another key is being pressed if the dialog doesn't have keyboard focus...
* You can use <Alt> to switch modes during an operation that supports it (e.g. Checksum
computation, DD image writing or zeroing, save to VHD, download, etc.
* IMPORTANT: This is *NOT* available for all operations. Especially, if you were hoping
to get transfer speed or ETA during ISO or WIM extraction, you *WILL* be disappointed.
* Also harmonize the code in checksum.c
* Add VDS formatting support (through an Alt-V cheat mode)
* Add partition index support
* Improve(?) Windows To Go support by following Microsoft recommended partition order
* Code refactoring & cleanup
* Add display of persistence controls on relevant images
* Add progress on ext3 formatting and improve error reporting
* Also improve MountVolume() and fix some Coverity warnings
* Add a proper delay before retrying a write operation and increase retry count to 4
* Add retries when clearing boot records or when zeroing a drive
* Also improve log output from USB device reset
* Add timestamp processing for nested signature and check for anomalous differences
* Also prevent attack scenarios that may attempt to leverage multiple nested signatures or countersigners
* Simplify code by using CryptDecodeObjectEx/WinVerifyTrustEx and improve timestamp reporting
* Introduced in 369a392af0 because, of course when Microsoft has a
call that goes (###, param1, param2) they define a macro for it that goes (param2, param1)...
* Add a WaitForSingleObjectWithMessages() call so that we can process Windows messages
while waiting on events (prevents lockup while issuing log messages)
* Limit the total duration of CheckDriveAccess() to 2 seconds
* Allow for user cancellation
* Also update code to use the Edit_####() predefined macros for Edit controls instead of EM_### messages
* Should only happen with Windows 10 Creator Update (1703)
* Closes#931
* Also silence the flow of bcdboot benign errors on WinToGo creation (unless USB Debug is enabled)
* Also ensure WaitForLogical() will not actually spends 15 seconds max before giving up
* It appears that 1.5TB and 2TB HDDs, accessed trough some Seagate ow WD USB ↔ SATA
controllers, can report that 0 bytes were written on WriteFile(), even though all
the data was effectively written. 1TB HDDs, accessed through the same controller,
do not report this issue. So add a workaround for that.
* Also see #787
* SetChecksumAffinity() now spreads the affinity evenly between cores
* Also increase the read buffer size to help with performance
* At this stage, the only limiting factor regarding performance seems
to be the speed of the SHA-256 algorithm...
* 7z has a quirk in that one MUST specify the image index
when a WIM has multiple images, but the same index MUST
be omitted if there is only one.
* Because of this, Windows 7 Enterprise images reported a
(nonfatal) extraction error when trying 7z.
* Closes#680
* Also fix a typo in registry.h
* MinGW's gcc 4.9.2 seems to implement a broken "%lld" format 64 bit integer is
followed by more variables and the app executes on XP => use PRI macros
* Also fix partition ID being ignored when using Rufus MBR
* Also fix some global vars shadowing and add other improvements