computer-use-ootb-internal 0.0.181__py3-none-any.whl → 0.0.183__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.
@@ -822,8 +822,12 @@ class GuardService(win32serviceutil.ServiceFramework):
822
822
  self.log_error(f"Cannot create task for {username}: sys.executable is not found.")
823
823
  return False
824
824
 
825
- # Use the python executable that the service itself is running under
826
- python_exe = sys.executable
825
+ # Find the correct python.exe/pythonw.exe from the environment
826
+ python_exe = self._get_python_executable_from_target_exe()
827
+ if not python_exe:
828
+ self.log_error(f"Cannot create task for {username}: Failed to find associated python executable via _get_python_executable_from_target_exe.")
829
+ return False
830
+
827
831
  if ' ' in python_exe and not python_exe.startswith('"'):
828
832
  python_exe = f'"{python_exe}"'
829
833
 
@@ -857,16 +861,13 @@ class GuardService(win32serviceutil.ServiceFramework):
857
861
  $action = New-ScheduledTaskAction -Execute '{safe_action_executable}' -Argument '{safe_action_arguments}'
858
862
  {working_directory_setting}
859
863
 
860
- # Trigger: On session connect (Event ID 21)
861
- $logName = 'Microsoft-Windows-TerminalServices-LocalSessionManager/Operational'
862
- $source = 'Microsoft-Windows-TerminalServices-LocalSessionManager'
863
- $eventIDs = @(21, 25)
864
- $trigger = New-ScheduledTaskTrigger -Event -LogName $logName -Source $source -EventId $eventIDs[0]
865
- # Optional Delay: -Delay 'PT15S'
864
+ # Trigger: At Logon for the specified user
865
+ $trigger = New-ScheduledTaskTrigger -AtLogOn
866
+ # Optional: Add delay if needed (e.g., after desktop loads)
866
867
  # $trigger.Delay = 'PT15S'
867
868
 
868
869
  $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit (New-TimeSpan -Days 9999) -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1)
869
- $description = "Triggers OOTB Guard Service for user {username} upon session connect via internal signal." # Updated description
870
+ $description = "Triggers OOTB Guard Service for user {username} upon logon via internal signal." # Updated description
870
871
 
871
872
  # Unregister existing task first (force)
872
873
  Unregister-ScheduledTask -TaskName $taskName -Confirm:$false -ErrorAction SilentlyContinue
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: computer-use-ootb-internal
3
- Version: 0.0.181
3
+ Version: 0.0.183
4
4
  Summary: Computer Use OOTB
5
5
  Author-email: Siyuan Hu <siyuan.hu.sg@gmail.com>
6
6
  Requires-Python: >=3.11
@@ -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=zGccyiqOnid8Yntm2F5Yvj6HA5Z2CoE9IqsxRZdieUg,27548
4
4
  computer_use_ootb_internal/dependency_check.py,sha256=y8RMEP6RXQzTgU1MS_1piBLtz4J-Hfn9RjUZg59dyvo,1333
5
- computer_use_ootb_internal/guard_service.py,sha256=UkRsMT7x5m2ViNGcQaipzjG7fHuGSAN3x0Ed15Wbq0E,51323
5
+ computer_use_ootb_internal/guard_service.py,sha256=5N8pACyt8-kwfxwCUW5Pj9NeV79Fi03VyADnvhnZ2Fw,51323
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=1fLVUDHcZIeHbmbk36GX8ccjSn74riqTEWLfrx0FgKU,8463
8
8
  computer_use_ootb_internal/service_manager.py,sha256=SD8jzfn0VVXBOr_nP6zmBWSC2TzrU_sp2e5JJkSlQFU,9734
@@ -39,7 +39,7 @@ computer_use_ootb_internal/preparation/powerpoint_prepare.py,sha256=fAijB09ILDGp
39
39
  computer_use_ootb_internal/preparation/pr_prepare.py,sha256=4Xxe7I2iMUpGTZFvoRrPg-uwPkq_TALquphyYt5t59E,5085
40
40
  computer_use_ootb_internal/preparation/star_rail_prepare.py,sha256=r0b19M_c1sXkN3_MRFjql8w_ThC9nZUe8zbSLYUvKS8,4635
41
41
  computer_use_ootb_internal/preparation/word_prepare.py,sha256=llNM-sInwnfLRDbfCwS71aeMg9npj9JQ1I7jM3ZoJp0,4665
42
- computer_use_ootb_internal-0.0.181.dist-info/METADATA,sha256=y1hUmXrNBAKe8KeaoHjyPpOncZkjorJR-C7MTVvkwfo,1048
43
- computer_use_ootb_internal-0.0.181.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
- computer_use_ootb_internal-0.0.181.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
45
- computer_use_ootb_internal-0.0.181.dist-info/RECORD,,
42
+ computer_use_ootb_internal-0.0.183.dist-info/METADATA,sha256=Z9wMMUC31-hkpdl98WqMc_GL_rgsjRtzENUYETeQEa4,1048
43
+ computer_use_ootb_internal-0.0.183.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
44
+ computer_use_ootb_internal-0.0.183.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
45
+ computer_use_ootb_internal-0.0.183.dist-info/RECORD,,