Skip to content

Commit

Permalink
fix(inject): restore button
Browse files Browse the repository at this point in the history
close #49
  • Loading branch information
std-microblock committed Feb 4, 2025
1 parent db7ff4c commit 2c94566
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 19 deletions.
22 changes: 4 additions & 18 deletions src/inject/inject.cc
Original file line number Diff line number Diff line change
Expand Up @@ -454,24 +454,10 @@ struct restore_btn : public button_widget {
restore_btn() : button_widget("还原") {}

void on_click() override {
// reg delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}" /f
// reg delete "HKCU\Software\Classes\CLSID\{86ca1aa0-34aa-4e8b-a509-50c905bae2a2}\InprocServer32" /f

HKEY key;
RegOpenKeyExW(HKEY_CURRENT_USER,
L"HKCU\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-"
L"50c905bae2a2}\\InprocServer32",
0, KEY_SET_VALUE, &key);
RegDeleteValueW(key, L"");
RegCloseKey(key);

RegOpenKeyExW(HKEY_CURRENT_USER,
L"HKCU\\Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-"
L"50c905bae2a2}",
0, KEY_SET_VALUE, &key);

RegDeleteValueW(key, L"");
RegCloseKey(key);
RegDeleteKeyValueW(HKEY_CURRENT_USER,
L"Software\\Classes\\CLSID\\{86ca1aa0-34aa-4e8b-a509-"
L"50c905bae2a2}\\InprocServer32",
nullptr);
}
};

Expand Down
2 changes: 1 addition & 1 deletion src/shell/entry.cc
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
#include <consoleapi.h>
#include <debugapi.h>
#include <type_traits>
#include <winreg.h>
#include <winuser.h>

#define NOMINMAX
Expand Down Expand Up @@ -109,7 +110,6 @@ void main() {
lptpm);
}


has_active_menu = true;
menu menu = menu::construct_with_hmenu(hMenu, hWnd);
auto menu_render = menu_render::create(x, y, menu);
Expand Down

0 comments on commit 2c94566

Please sign in to comment.