AEAEAEAE4343 / SimpleClassicTheme

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] SCT throws unhandled exception on uninstall if registry editor does not work

kiraventom opened this issue · comments

Describe the bug
When trying to uninstall SCT, after message "Several registry imports will be done to restore settings. Please click yes on all of them.", unhandled exception of type "Win32Exception" is thrown and uninstall process is interrupted.

Reproduction
Install any third-party registry editor (in my case, O&O RegEditor), set it as default registry editor and corrupt its files (in my case, I accidentally deleted its folder).

Expected behavior
Maybe handling of the exception -- like the message box saying "Could not run registry editor" or smth like this.

Screenshots
image

Environment:

  • OS: (Win10 ver 21H2)
  • SCT Version (1.5.3)

Additional info
I just want to leave this issue, so someone with the similar problem could find the solution. In my case, I just deleted all mentions of "ooregedt" from registry, thus setting windows registry editor as default editor. I suppose the exception is thrown here

Full exception message:

************** Exception Text **************
System.ComponentModel.Win32Exception (0x80004005): Application not found
at System.Diagnostics.Process.StartWithShellExecuteEx(ProcessStartInfo startInfo)
at System.Diagnostics.Process.Start(ProcessStartInfo startInfo)
at SimpleClassicTheme.ClassicTheme.RemoveSCT()
at SimpleClassicTheme.MainForm.ButtonUninstall_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

commented

Isn't replacing system files and then deleting those new files user error? If you break registry editor, you break it, that's not SCT's job to handle?

I did not replace system files, I just installed third-party software and it set itself as '.reg' files opener. By the way, it's pretty easy to mess up this particular app, because it's portable -- I deleted it while cleaning the 'Downloads' folder.

However, as I stated previously, I left this issue only so that if someone stumbles upon such problem, they could find the solution. For example, I was able to understand what's the problem only because I am familiar with C# and was able to track down the particular line of code that caused the problem.