win-planner 1.0.2__tar.gz → 1.0.3__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {win_planner-1.0.2 → win_planner-1.0.3}/PKG-INFO +1 -1
- {win_planner-1.0.2 → win_planner-1.0.3}/setup.py +1 -1
- {win_planner-1.0.2 → win_planner-1.0.3}/win_planner/__init__.py +8 -7
- {win_planner-1.0.2 → win_planner-1.0.3}/win_planner.egg-info/PKG-INFO +1 -1
- {win_planner-1.0.2 → win_planner-1.0.3}/README.md +0 -0
- {win_planner-1.0.2 → win_planner-1.0.3}/pyproject.toml +0 -0
- {win_planner-1.0.2 → win_planner-1.0.3}/setup.cfg +0 -0
- {win_planner-1.0.2 → win_planner-1.0.3}/win_planner.egg-info/SOURCES.txt +0 -0
- {win_planner-1.0.2 → win_planner-1.0.3}/win_planner.egg-info/dependency_links.txt +0 -0
- {win_planner-1.0.2 → win_planner-1.0.3}/win_planner.egg-info/requires.txt +0 -0
- {win_planner-1.0.2 → win_planner-1.0.3}/win_planner.egg-info/top_level.txt +0 -0
|
@@ -6,7 +6,7 @@ with open("README.md", encoding="utf-8") as f:
|
|
|
6
6
|
|
|
7
7
|
setup(
|
|
8
8
|
name="win_planner",
|
|
9
|
-
version="1.0.
|
|
9
|
+
version="1.0.3",
|
|
10
10
|
description="Регистрация задач в Планировщике задач Windows с наивысшими доступными правами и кастомным именем",
|
|
11
11
|
long_description=long_description,
|
|
12
12
|
long_description_content_type="text/markdown",
|
|
@@ -15,22 +15,23 @@ import sys
|
|
|
15
15
|
import ctypes
|
|
16
16
|
from datetime import datetime
|
|
17
17
|
|
|
18
|
-
__version__ = "1.0.
|
|
18
|
+
__version__ = "1.0.3"
|
|
19
19
|
__all__ = ["task_create", "task_update", "add_self"]
|
|
20
20
|
|
|
21
21
|
try:
|
|
22
22
|
import pythoncom
|
|
23
23
|
from win32com.client import Dispatch
|
|
24
|
-
from win32com.taskscheduler.taskscheduler import (
|
|
25
|
-
TASK_TRIGGER_LOGON,
|
|
26
|
-
TASK_ACTION_EXEC,
|
|
27
|
-
TASK_LOGON_INTERACTIVE_TOKEN,
|
|
28
|
-
TASK_CREATE_OR_UPDATE,
|
|
29
|
-
)
|
|
30
24
|
_COM_OK = True
|
|
31
25
|
except ImportError:
|
|
32
26
|
_COM_OK = False
|
|
33
27
|
|
|
28
|
+
# Константы Планировщика задач (из taskschd.h).
|
|
29
|
+
# Объявляем вручную — в некоторых сборках pywin32 их нельзя импортировать.
|
|
30
|
+
TASK_TRIGGER_LOGON = 9 # триггер «при входе пользователя»
|
|
31
|
+
TASK_ACTION_EXEC = 0 # действие «запустить программу»
|
|
32
|
+
TASK_LOGON_INTERACTIVE_TOKEN = 3
|
|
33
|
+
TASK_CREATE_OR_UPDATE = 6
|
|
34
|
+
|
|
34
35
|
|
|
35
36
|
def _is_admin() -> bool:
|
|
36
37
|
try:
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|