BCUninstaller/Bulk-Crap-Uninstaller · error · IOException

Failed to call the API

Error message

Failed to call the API

What it means

BeginSysRestore calls the native System Restore API (SRSetRestorePoint) via SysRestore.StartRestore, which returns a numeric result; a negative value means the API call failed. This IOException (SysRestoreGenericError) wraps that failure and is surfaced through the loading dialog, after which the user is asked whether to continue without a restore point.

Source

Thrown at source/BulkCrapUninstaller/Functions/Tools/SystemRestore.cs:46

        /// <param name="displayMessage">If user should be asked to create the restore point. If false, always create</param>
        /// <param name="owner">Window to show on top of</param>
        public static bool BeginSysRestore(int count, bool displayMessage = true, Form owner = null)
        {
            if (!SysRestore.SysRestoreAvailable()) return false;

            // If a restore is already running, do not start another one
            if (_currentRestoreId != long.MinValue) return true;

            switch (displayMessage ? MessageBoxes.SysRestoreBeginQuestion() : MessageBoxes.PressedButton.Yes)
            {
                case MessageBoxes.PressedButton.Yes:
                    var error = LoadingDialog.ShowDialog(owner, Localisable.LoadingDialogTitleCreatingRestorePoint, x =>
                    {
                        EndSysRestore();

                        var result = SysRestore.StartRestore(MessageBoxes.GetSystemRestoreDescription(count), out _currentRestoreId, 3);
                        if (result < 0)
                            throw new IOException(Localisable.SysRestoreGenericError);
                    });

                    return error == null ||
                           MessageBoxes.SysRestoreContinueAfterError(error.Message) ==
                           MessageBoxes.PressedButton.Yes;

                default:
                case MessageBoxes.PressedButton.No:
                case MessageBoxes.PressedButton.Cancel:
                    return false;
            }
        }

        /// <summary>
        ///     Cancel running restore if any
        /// </summary>
        public static void CancelSysRestore()
        {

View on GitHub (pinned to 608321de98)

Solutions

  1. Run BCU as administrator.
  2. Enable System Protection on the system drive.
  3. Start the Volume Shadow Copy and Microsoft Software Shadow Copy Provider services.
  4. Free disk space / increase shadow storage for restore points.
Defensive patterns

Strategy: try-catch

Validate before calling

if (!SysRestore.SysRestoreAvailable()) { /* warn, skip restore point */ }

Try / catch

try { BeginSysRestore(count, true, owner); }
catch (IOException) { /* ask user whether to continue without a restore point */ }

Prevention

When it happens

Trigger: System Restore service disabled or stopped; running without administrator rights; System Protection disabled on all drives; Volume Shadow Copy / provider services down; insufficient free space for shadow copies.

Common situations: User disabled System Protection; non-elevated BCU; SR service stopped by policy; disk full for shadow storage.

Related errors


AI-assisted analysis of BCUninstaller/Bulk-Crap-Uninstaller@608321de98 (2026-08-13). Data as JSON: /api/errors/7343b88433abccab. Report an issue: GitHub.