computer-use-ootb-internal 0.0.134__py3-none-any.whl → 0.0.135__py3-none-any.whl
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.
- computer_use_ootb_internal/guard_service.py +17 -23
- {computer_use_ootb_internal-0.0.134.dist-info → computer_use_ootb_internal-0.0.135.dist-info}/METADATA +1 -1
- {computer_use_ootb_internal-0.0.134.dist-info → computer_use_ootb_internal-0.0.135.dist-info}/RECORD +5 -5
- {computer_use_ootb_internal-0.0.134.dist-info → computer_use_ootb_internal-0.0.135.dist-info}/WHEEL +0 -0
- {computer_use_ootb_internal-0.0.134.dist-info → computer_use_ootb_internal-0.0.135.dist-info}/entry_points.txt +0 -0
@@ -709,48 +709,42 @@ class GuardService(win32serviceutil.ServiceFramework):
|
|
709
709
|
return False
|
710
710
|
|
711
711
|
task_name = f"OOTB_UserConnect_{username}" # Renamed task slightly
|
712
|
-
|
713
|
-
|
712
|
+
# Action: Run a simple test command instead of the main executable
|
713
|
+
action_executable = 'cmd.exe'
|
714
|
+
test_output_file = f"C:\Users\{username}\task_test_{task_name}.txt" # User-specific file
|
715
|
+
action_arguments = f"/C echo Task {task_name} ran at %DATE% %TIME% > \"{test_output_file}\"" # Quote the path
|
714
716
|
safe_action_executable = action_executable.replace("'", "''")
|
715
717
|
safe_action_arguments = action_arguments.replace("'", "''")
|
716
718
|
|
717
|
-
# Explicitly set the working directory to the executable's location
|
719
|
+
# Explicitly set the working directory to the executable's location (Might not matter for echo, but keep for consistency)
|
718
720
|
try:
|
719
721
|
executable_dir = os.path.dirname(self.target_executable_path.strip('"'))
|
720
|
-
if not executable_dir:
|
721
|
-
executable_dir = "." # Use current directory as fallback?
|
722
|
-
self.log_warning(f"Could not determine directory for {self.target_executable_path}, task WorkingDirectory might be incorrect.")
|
722
|
+
if not executable_dir: executable_dir = "."
|
723
723
|
safe_working_directory = executable_dir.replace("'", "''")
|
724
724
|
working_directory_setting = f"$action.WorkingDirectory = '{safe_working_directory}'"
|
725
725
|
except Exception as e:
|
726
|
-
self.log_error(f"Error determining working directory for task: {e}.
|
727
|
-
working_directory_setting = "# Could not set WorkingDirectory"
|
726
|
+
self.log_error(f"Error determining working directory for task: {e}. WD will not be set.")
|
727
|
+
working_directory_setting = "# Could not set WorkingDirectory"
|
728
728
|
|
729
729
|
# PowerShell command construction
|
730
730
|
ps_command = f"""
|
731
731
|
$taskName = "{task_name}"
|
732
732
|
$principal = New-ScheduledTaskPrincipal -UserId "{username}" -LogonType Interactive
|
733
733
|
|
734
|
-
# Action: Run
|
734
|
+
# Action: Run the SIMPLE test command
|
735
735
|
$action = New-ScheduledTaskAction -Execute '{safe_action_executable}' -Argument '{safe_action_arguments}'
|
736
|
-
{working_directory_setting}
|
736
|
+
# {working_directory_setting} # Working directory less relevant for this test
|
737
737
|
|
738
|
-
# Trigger: On session connect
|
738
|
+
# Trigger: On session connect (Event ID 21)
|
739
739
|
$logName = 'Microsoft-Windows-TerminalServices-LocalSessionManager/Operational'
|
740
740
|
$source = 'Microsoft-Windows-TerminalServices-LocalSessionManager'
|
741
|
-
$eventIDs = @(21, 25)
|
742
|
-
|
743
|
-
|
744
|
-
#
|
745
|
-
# $trigger = New-ScheduledTaskTrigger -AtLogOn -User "{username}"
|
746
|
-
# Add a 15 second delay to allow the session to potentially settle
|
747
|
-
$trigger = New-ScheduledTaskTrigger -Event -LogName $logName -Source $source -EventId $eventIDs[0] -Delay 'PT15S' # Primary trigger with delay
|
748
|
-
# Register additional triggers if needed, or handle logic differently.
|
749
|
-
# For simplicity, let's try one event trigger first (ID 21). If reconnect (25) is needed, we can add it.
|
750
|
-
# Consider adding delay: -Delay 'PT15S' # Delay 15 seconds after event?
|
741
|
+
$eventIDs = @(21, 25)
|
742
|
+
$trigger = New-ScheduledTaskTrigger -Event -LogName $logName -Source $source -EventId $eventIDs[0]
|
743
|
+
# Optional Delay: -Delay 'PT15S'
|
744
|
+
# $trigger.Delay = 'PT15S' # Add delay this way if needed
|
751
745
|
|
752
746
|
$settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit (New-TimeSpan -Days 9999) -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1)
|
753
|
-
$description = "Runs
|
747
|
+
$description = "**TEST TASK** Runs a simple echo command for user {username} upon session connect." # Updated description
|
754
748
|
|
755
749
|
# Unregister existing task first (force) - Use the NEW task name
|
756
750
|
Unregister-ScheduledTask -TaskName $taskName -Confirm:$false -ErrorAction SilentlyContinue
|
@@ -765,7 +759,7 @@ class GuardService(win32serviceutil.ServiceFramework):
|
|
765
759
|
# Append trigger is more complex via PowerShell cmdlets, often easier via XML or COM
|
766
760
|
|
767
761
|
"""
|
768
|
-
self.log_info(f"Attempting to create/update
|
762
|
+
self.log_info(f"Attempting to create/update **TEST TASK** '{task_name}' for user '{username}' to run simple echo command.")
|
769
763
|
try:
|
770
764
|
# Need to actually run the powershell command here!
|
771
765
|
success = self.run_powershell_command(ps_command)
|
{computer_use_ootb_internal-0.0.134.dist-info → computer_use_ootb_internal-0.0.135.dist-info}/RECORD
RENAMED
@@ -2,7 +2,7 @@ computer_use_ootb_internal/README.md,sha256=FxpW95lyub2iX73ZDfK6ML7SdEKg060H5I6G
|
|
2
2
|
computer_use_ootb_internal/__init__.py,sha256=Nqnn8clbgv-5l0PgxcTOldg8mkMKrFn4TvPL-rYUUGg,1
|
3
3
|
computer_use_ootb_internal/app_teachmode.py,sha256=ZZW98870QPNK76LN4f4k9RjBELYcF_3hl0w0fvxj3dY,22268
|
4
4
|
computer_use_ootb_internal/dependency_check.py,sha256=y8RMEP6RXQzTgU1MS_1piBLtz4J-Hfn9RjUZg59dyvo,1333
|
5
|
-
computer_use_ootb_internal/guard_service.py,sha256=
|
5
|
+
computer_use_ootb_internal/guard_service.py,sha256=MWeDCOHrJPDbt4NQJ5JvZZn6EH66Bd191oCY4mTBuaw,45192
|
6
6
|
computer_use_ootb_internal/requirements-lite.txt,sha256=5DAHomz4A_P2BmTIXNkNqkHbnIF0AyZ4_1XAlb1LaYs,290
|
7
7
|
computer_use_ootb_internal/run_teachmode_ootb_args.py,sha256=HB7L9vuIPUXVqeTicyNJKArzTNAfgdpsyO3JEzmByIo,7315
|
8
8
|
computer_use_ootb_internal/service_manager.py,sha256=SD8jzfn0VVXBOr_nP6zmBWSC2TzrU_sp2e5JJkSlQFU,9734
|
@@ -33,7 +33,7 @@ computer_use_ootb_internal/computer_use_demo/tools/run.py,sha256=xhXdnBK1di9muaO
|
|
33
33
|
computer_use_ootb_internal/computer_use_demo/tools/screen_capture.py,sha256=L8qfvtUkPPQGt92N-2Zfw5ZTDBzLsDps39uMnX3_uSA,6857
|
34
34
|
computer_use_ootb_internal/preparation/__init__.py,sha256=AgtGHcBpiTkxJjF0xwcs3yyQ6SyUvhL3G0vD2XO-zJw,63
|
35
35
|
computer_use_ootb_internal/preparation/star_rail_prepare.py,sha256=s1VWszcTnJAKxqCHFlaOEwPkqVSrkiFx_yKpWSnSbHs,2649
|
36
|
-
computer_use_ootb_internal-0.0.
|
37
|
-
computer_use_ootb_internal-0.0.
|
38
|
-
computer_use_ootb_internal-0.0.
|
39
|
-
computer_use_ootb_internal-0.0.
|
36
|
+
computer_use_ootb_internal-0.0.135.dist-info/METADATA,sha256=CTzW93BTqEm4AlHsJKye7eR6NT62h16TBE-gkcqiWkY,1048
|
37
|
+
computer_use_ootb_internal-0.0.135.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
38
|
+
computer_use_ootb_internal-0.0.135.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
|
39
|
+
computer_use_ootb_internal-0.0.135.dist-info/RECORD,,
|
{computer_use_ootb_internal-0.0.134.dist-info → computer_use_ootb_internal-0.0.135.dist-info}/WHEEL
RENAMED
File without changes
|
File without changes
|