Commit Graph

75 Commits

Author SHA1 Message Date
Pete Batard 5eae8a6441
[cmp] Enable extraction of zip archives outside of ISO copy mode
* This enables the use of Ctrl-SELECT to also extract files from a .zip
  when using non-bootable, DOS, UEFI-NTFS, etc.
* Also clean up some uprintf line terminations and some additional code.
* Also fix some Coverity and MinGW warnings.
2024-03-12 17:41:27 +00:00
Pete Batard e9d588a6e0
[iso] add symlink support for target file systems that support it
* For now that means only NTFS. And we only do that for ISO-9660/Rock Ridge images.
2023-10-12 17:32:20 +01:00
Pete Batard 7eb9a6f16b
[misc] fix some benign Coverity warnings 2023-06-18 19:09:15 +02:00
Pete Batard 3e81b38c2d
[misc] try to support folks who use a symlink for their temp dir
* Microsoft's WIM mounting APIs can't use symlinked directories and
  some folks want to use a symlinked temp dir...
* Closes #2084
2023-06-05 14:08:25 +01:00
Pete Batard b163b3dfe2
[core] fix default listing of large SanDisk SSD devices
* Closes #2164
* Also add breakdown of score computation when device enumeration debug is active
* Also fix a minor Code Analysis warning in msapi_utf8.h
2023-02-13 13:34:17 +00:00
Pete Batard c19ef1125d
[wue] allow the provision of an arbitrary local account username
* This is required because, even though it's easy to change a local account name
  post install, doing so does not change the directory name in C:\Users\
2022-10-18 13:58:38 +01:00
Pete Batard 9073962faf
[wue] add automatic local account creation and regional settings duplication
* Local account is created with the same name as the current user along with an *empty* password
  (which we force the user to change on next logon). This is done to assuage users who might be
  weary of entering a password in a third party application, and has the benefit of enabling
  autologon when the install is complete.
* Note that the creation of a local account through an answer file prevents Windows 11 22H2
  from bugging users about MSA *even with an active network connection*.
* For convenience reasons, only duplication of the current username is enabled. We *may* add a
  dialog to enter any random username in a future version, but for 3.20, this is all you get.
* Likewise, the locale duplication is only carried out during OOBE and *not* WinPE (which means
  that you still get the initial "Windows setup language and user preferences" prompt). This is
  intentional as otherwise the default screen and "Repair Windows" options are not presented.
* It's not my fault that the Windows password change screen is super ill conceived, whereas it
  doesn't hide the current password field as it should when the current password is blank, and
  one needs to click on a very small arrow to get the changes applied, instead of a PROMINENT
  button that should intuitively have been positioned right next to "Cancel".
* If you want to complain that we should just "present the user with XYZ and be done with it",
  please bear in mind that we can't add new dialogs to Rufus as willy-nilly as you believe we
  can. *ANY* new UI interface requires major planning, which is the reason why, for the time
  being, we are limited to reusing a simple dissociated list of checkboxes for all WUE options.
2022-07-19 19:11:06 +01:00
Pete Batard c28f9bc491
[misc] fix PVS-Studio warnings 2022-01-05 12:57:26 +01:00
Pete Batard a10b8e8c54
[iso] add Windows ISO version report
* Use sources/compatresources.dll, when available, to try to detect the Windows ISO version and build.
* Also report what facility we use for formatting.
2021-10-08 19:24:07 +01:00
Pete Batard 9d7e96e293
[core] move downloads from <app_location>\rufus_files\ to %LOCALAPPDATA%\Rufus\
* 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
2021-05-31 16:54:11 +01:00
Pete Batard 2a3e82fa96
[misc] switch to using LoadLibraryEx everywhere
* This allows us to further mitigate DLL side loading by enforcing
  LOAD_LIBRARY_SEARCH_SYSTEM32 / LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR.
2021-04-09 11:31:52 +01:00
Pete Batard 1f4a2aaf30
[misc] fix a warning in msapi_utf8.h
Also set the AppStore default codepage to UTF-8
2021-03-25 19:27:27 +00:00
Pete Batard 1062dde076
[appstore] add AppStore version detection
* Also make sure we don't include appstore.listing.csv in the app
  and remove unneeded call to GetModuleHandle() in pki.c.
2021-02-07 20:25:21 +00:00
Pete Batard fce645543f
[dev] add exception for Realtek card readers
* Also update copyright year to 2021
* Also update version for rufus-next
* Also set Win32 "A" APIs to UTF-8 and enable long paths in manifest
2021-01-06 19:27:31 +00:00
Pete Batard 34b1d8a3ca
[core] enable the direct provision of install.wim/install.esd for Windows To Go
* Also remove the use of 'unattend.xml' to disable the recovery environment (use bcdedit instead)
* Also some code cleanup and refactoring
2020-07-19 22:35:30 +01:00
Pete Batard 1e85b4dbf5
v3.11 (build 1678)
* Also fix a warning in msapi_utf8.h
2020-06-18 11:43:33 +01:00
Pete Batard e554d2b4e0
[misc] add Ctrl-SELECT option to provide additional content
* For now only .zip archives are supported
2020-06-10 21:25:33 +01:00
Pete Batard 71ede6d9a0
[cmp] update Bled to latest
* Also ensure that we support Unicode paths for 7-zip
* Also ensure that error messages are displayed in English
2020-06-10 20:13:12 +01:00
Pete Batard b3d35b27df
[misc] add _mkdirExU and _rmdirU to msapi_utf8.h 2020-05-17 22:53:48 +01:00
Pete Batard 2442aaf76f
[dev] improve FIXED vs REMOVABLE detection for drives with unmounted partitions
* And add an exception for a reported flash drive
* Also fix a couple warnings in msapi_utf8.h and net.c
2020-04-10 13:16:57 +01:00
Pete Batard ffa573ba5c
[misc] update msapi_utf8.h for C++ compilation
* Pure C++ compilers may throw cast errors.
2020-03-31 17:26:34 +01:00
Pete Batard c86a62ed69
[misc] update msapi_utf8.h to latest
* Also update appveyor.yml now that MinGW is part of the VS2019 image
2020-03-30 11:09:03 +01:00
Pete Batard 84427d12dd
[core] add an exception for JMicron flash drives
* Also fix another round of Coverity trigger-happy warnings (Seriously, those FALSE
  POSITIVES about fwprintf can £$%^&* off — fix your frigging detection, Synopsys!)
2019-08-05 20:18:34 +01:00
Pete Batard 307e2f7075
[core] fix 'Bad label' errors with empty labels
* Only happens on Win7 due to MinGW not automatically initializing variables to zero on that platform.
* Root of the problem was that GetWindowTextU() did not properly handle empty text controls, due to
  GetWindowTextW() returning 0 on empty strings. As a result, the UTF-8 label was not properly set to
  the empty string, but kept whatever data it contained, which is garbage on Windows 7 and resulted in
  an invalid label (even after sanitizing, since we don't sanitize low-level ASCII characters).
* Closes #1352
2019-08-01 18:42:51 +01:00
Pete Batard 5f9e65707f
[core] partitioning improvements
* Improve report and make sure we zero leftovers from the start of a partition
* Also add VDS error codes
* Also fix Coverity warnings
2019-04-27 16:04:47 +01:00
Pete Batard 1c39a80d72
[core] partial overhaul of the partitioning and formatting facilities
* 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
2019-04-25 18:58:55 +01:00
Pete Batard f02fbe3acc
[core] add full extraction support for efi.img
* Also, Solus distro maintainers, I hate you!
2019-04-04 19:12:48 +01:00
Pete Batard 661ba7b64c
[core] fix Win7 EFI boot file extraction when dual BIOS+UEFI is in use
* Closes #1292
* Also add "RISD" (Ricoh IDE SD Card reader) to list of card readers (#551)
* Also make running Fido script read-only
2019-03-27 12:21:41 +00:00
Pete Batard e073fb47b0
[net] add Windows retail ISO downloads
* This is accomplished through Fido (https://github.com/pbatard/Fido), a *SIGNED*
  PowerShell script, that is downloaded from GitHub and that resides in memory for
  the duration of a session.
* The reason we use a downloaded PS script, rather than an embedded on, is because:
  - Microsoft have regularly been changing the deal with regards to how retail ISOs
    can be downloaded, and not for the better, so we can't simply embed a static
    means of downloading ISOs and expect that to work forever.
  - By using an external script, we can immediately respond to whatever new means of
    *ANNOYING* their legitimate users Microsoft will come up with next, as well as
    make sure that, the minute a new retail version of Windows becomes available, it
    also becomes available for download in Rufus.
* Note that if you are concerned about downloading a remote PS script that is being
  run at the same level as an elevated application, you should understand that:
  - Only scripts downloaded from GitHub, from an account that is protected with 2FA,
    are allowed to run (i.e. someone would first have to steal a *physical* 2FA key
    to be in a position to upload a malicious script).
  - On top of this, only scripts that are signed with a separate private key (RSA +
    AES-256), that is itself also protected with a strong unique password which only
    a single person knows (and must manually enter each time they want to make a new
    version of the script available for download), are allowed to run.
  The above means that there's about as much chance for someone to manage to upload
  a malicious script on the GitHub servers, that Rufus would allow to run, as there
  is for someone to upload a malicious version of Rufus itself.
  Still, if you are paranoid and have concerns that, even as you can validate from
  its source that Rufus does not attempt to execute any remote script unless a user
  actively selected and clicked the DOWNLOAD button, you can also completely disable
  the remote script download feature, if you just set the update check to disabled
  (which, by the way, Rufus *EXPLICITLY* asks you to choose whether you want to
  enable or not, the very first time you run the application).
* Also remove _unlinkU() which duplicates what DeleteFileU() already does.
2019-03-02 23:34:32 +00:00
Pete Batard ff2548b559 [internal] align msapi_utf8.h to the one we use for libwdi 2018-07-28 11:59:44 +01:00
Pete Batard fdfc9ff82d [pki] add RSA-2048 signature validation for all server downloads
* Closes #1172
* Also fix a MinGW warning in badblocks.c
2018-06-29 18:19:05 +01:00
Pete Batard a44518355f [ui] UI redesign
* Better guide the user through the flow of operations
* Also follow a concept design by Fahad Al-Riyami
* Closes #117
2018-03-22 23:14:21 +00:00
Pete Batard fe3004d17f [misc] use UTF-8 compatible _unlinkU() when deleting files 2017-08-30 11:24:47 +01:00
Pete Batard 5d371088cb [iso] add EFI boot support from 'efi.img' FAT images
* Required to support Debian Live 9.1 in ISO mode
* Note that this only works if the efi.img boot files do not require
  additional content besides the one extracted from the ISO.
2017-08-09 16:27:11 +01:00
Pete Batard b4a2c06a2e [ui] ask user if they want proceed when conflicting processes are found
* Rufus now checks for processes with handles opened on the drives/volumes before
  starting the format operation and asks the user if they want to continue.
* This mimics Windows' behaviour when formatting drives, and actually uses the
  same message as the one from shell32.dll.mui.
* Closes #773
2017-07-16 22:42:19 +01:00
Pete Batard c00557900b [misc] drop WDK compilation support 2017-07-10 13:10:23 +01:00
Pete Batard 150be52479 [iso] notify if the file size on disk is smaller than expected ISO size
* Closes #963
* Also fix a potential issue with Notification()
2017-06-24 17:23:06 +01:00
Pete Batard d5f6ddb653 [core] list potentially blocking processes on disk access error
* Using functionality from Process Hacker:
  https://github.com/processhacker2/processhacker2/
* Part of the #773 enhancement
* Also fix minor MinGW and WDK warnings
2017-04-27 23:06:42 +01:00
Pete Batard afec69c428 [ui] improve logging data
* Display the selected locate as well as LGP info in the log
* Also fix some potential Coverity warnings
2017-04-25 14:32:19 +01:00
Pete Batard fff4465b1d [core] improve Unicode support
* Microsoft's version of _wgetenv() is *BROKEN*!
* Also set rufus-next to 2.15
2017-04-19 11:16:20 +01:00
Pete Batard be1bdb7c85 [misc] miscellaneous cleanup
* Also add CreateWindowExU() method
* Also add the 'DisableFileIndexing' to the ini template
2017-04-04 17:26:45 +01:00
Pete Batard 9dd06e93bc [ui] improve Windows format prompt autoclose
* Closes #794
* Also reorder some messages (so that RUFUS_TEST comes first)
* Also update issue template
2016-07-09 16:20:58 +01:00
Pete Batard ed1b3fd72e [iso] reload label after formatting
* The Windows APIs may further modify the label compared to our proposed
  version (e.g. remove trailing spaces), and we need an exact label for
  the Syslinux/GRUB config file update.
* This issue was reported against Springdale Linux, where the isolinux.cfg
  label was patched using 'SPRINGDALE\x20' instead of 'SPRINGDALE'
* Closes #784
* Also ensure that we don't replace NULL buffers in msapi_utf8.h and add
  GetVolumeInformationU()
2016-06-26 22:24:16 +02:00
Pete Batard c0393aec08 [misc] add a few more missing calloc checks
* Also use the relevant macro in msapi_utf8.h
2016-06-08 16:32:31 +01:00
Pete Batard 66534640a4 [enum] use Unicode when retrieving the device friendly name
* This should fix the improper display of some localized strings such as
  "Microsoft Virtual Disk"
2016-06-05 20:21:16 +01:00
Pete Batard e1f8b276c8 [loc] fix various RTL issues
* MSG_002 doesn't display in RTL
* Update Policy dialog loses RTL setting after the first paragraph
* Some text displayed in native Windows message boxes is not using RTL
 (even as the Message Box itself will display the rest of the UI elements as RTL)
* Detect if the relevant language pack is installed and use MessageBoxEx to
  display native message box buttons using the selected language.
* All theses issues are part of #621
* Also remove trailing whitespaces
2015-10-18 21:37:58 +01:00
Pete Batard 5025e27228 [misc] fix XP breakage
* Can't wait until XP support is dropped from Rufus altogether...
2015-09-28 02:32:11 +01:00
Pete Batard 9411716074 [misc] fix a coverity report in msapi_utf8.h 2015-09-28 01:28:29 +01:00
Pete Batard 67081fac6e [cmp] update Bled to latest
* Also fix a possible buffer overflow in msapi_utf8.h
2015-09-05 18:22:52 +01:00
Johannes Holzhäuer 387b1fbce7 [misc] do not declare _CRT_SECURE_NO_WARNINGS and use secure functions
* From NickPapagiorgio/rufus@c144d76852
2015-09-04 13:42:55 +01:00