-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathuninstall.py
More file actions
28 lines (20 loc) · 787 Bytes
/
uninstall.py
File metadata and controls
28 lines (20 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
if __name__ == '__main__':
import sys
from pathlib import Path
from winreg import HKEY_CLASSES_ROOT, DeleteKey
from winotify import Notifier, Registry
frozen: bool = hasattr(sys, 'frozen')
location: Path = Path(sys.executable).parent if frozen else Path(__file__).parent
registry: Registry = Registry('Pietrodev')
notifier: Notifier = Notifier(registry)
notifier.set_icon(location.joinpath("Icons/Master.ico"))
try:
DeleteKey(HKEY_CLASSES_ROOT, r'Directory\\Background\\shell\\Pietrodev\\shell\\Linker')
notification = notifier.create_notification(
title = 'Linker', msg = 'Linker has been uninstalled.'
)
except:
notification = notifier.create_notification(
title = 'Linker', msg = 'Linker has not been installed yet.'
)
notification.show()