Add registry-backup gating (SAFE mode) and minor robustness improvements#6
Draft
TantalusDrive wants to merge 15 commits intoptrumpis:mainfrom
Draft
Add registry-backup gating (SAFE mode) and minor robustness improvements#6TantalusDrive wants to merge 15 commits intoptrumpis:mainfrom
TantalusDrive wants to merge 15 commits intoptrumpis:mainfrom
Conversation
- SAFE mode: Registry modifications are performed only if automatic registry backup (EnablePeriodicBackup) is active. If it’s not enabled, the script offers the user the option to turn it on before proceeding, reducing the risk of irreversible changes. - Improved diagnostics / extended echo: Echo messages provide clearer feedback for added keys, already registered DLLs, and operations skipped in SAFE mode. Enhances transparency of actions without repeating information.
SAFE mode / registry gating: - Destructive registry operations only executed if evidence of automatic registry backups is present (RegBack files or scheduled task). - Offers user the option to enable RegBack automatically (EnablePeriodicBackup DWORD + RegIdleBackup task). Diagnostics / transparency: - Messages for skipped destructive actions, invalid signatures, removed or moved entries, and successful registrations. - Provides clearer feedback on registry reconciliation and DLL registration. DLL handling improvements: - Accepts any amdocl*.dll variant, including custom-built ICDs. - Bitness detection simplified and stabilized; ensures 32/64-bit registry placement is consistent. Additional safety: - Authenticode signature verification added (optional $AllowUnsigned for legacy GPUs). - Non-destructive unless SAFE mode permits.
- Reworded main paragraph highlighting detection, SysWOW64 handling, PATH scan, status output, versioned/custom ICD support, and registry writes gated on automatic backups. - Updated PowerShell section to emphasize added features only: signature verification, precise 32/64-bit detection, safe cleanup/relocation of invalid entries, DriverStore handling, more detailed output, and optional automatic registry backup enabling. - Clarified -AllowUnsigned option behavior for PowerShell script. - Minor wording improvements for clarity and flow.
Update README.md
- More robust detection of administrative privileges and Windows version. - Explicit handling of SysWOW64 in addition to System32. - Improved 32/64-bit ICD registration heuristics to reduce misclassification. - Support for versioned AMD OpenCL DLL variants already used by some drivers. - Prevention of duplicate registry entries. - Introduction of a SAFE mode that skips registry modifications when automatic registry backups are not available or enabled. - Restored and expanded user-facing output to clearly report detections, registrations, skipped operations, and SAFE mode status.
Using fsutil instead o net session for more reliable privilege check
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hi!
Following up on the previous improvements, this PR focuses mainly on making both scripts safer in environments where registry recovery may not be available, while keeping the original behavior intact.
Batch script
Registry modifications are now gated on the presence of automatic registry backups. If backups are not detected, the script runs in SAFE mode and skips registry writes, with an interactive option to enable registry backups if the user wants to proceed.
While touching this area, the bitness selection logic was also slightly simplified and hardened to reduce edge cases in mixed or versioned AMD ICD setups.
PowerShell script
The same safety model is applied here as well, using RegBack detection and an optional attempt to enable it automatically. Destructive registry operations are skipped when backups are not available, keeping the script non-destructive by default.
README
Updated to document the safety model, clarify default behaviors (including unsigned DLL handling), and better distinguish main functionality from PowerShell-specific extensions.
Let me know if you’d prefer any of this split out or adjusted.
Batch

PowerShell
(coming soon)