computer-use-ootb-internal 0.0.133__py3-none-any.whl → 0.0.134__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.
@@ -614,8 +614,7 @@ class GuardService(win32serviceutil.ServiceFramework):
614
614
  try:
615
615
  session_id = active_sessions[user]
616
616
  token = win32ts.WTSQueryUserToken(session_id)
617
- # env = win32profile.CreateEnvironmentBlock(token, False) # <-- Temporarily disable creating env block
618
- env = None # Use default environment provided by CreateProcessAsUser
617
+ env = win32profile.CreateEnvironmentBlock(token, False) # <-- Restore creating env block
619
618
  startup = win32process.STARTUPINFO()
620
619
  creation_flags = 0x00000010 # CREATE_NEW_CONSOLE
621
620
 
@@ -625,13 +624,13 @@ class GuardService(win32serviceutil.ServiceFramework):
625
624
  cwd = os.path.dirname(self.target_executable_path.strip('"')) if os.path.dirname(self.target_executable_path.strip('"')) != '' else None
626
625
  # --- End Launch via cmd /K ---
627
626
 
628
- self.log_info(f"Calling CreateProcessAsUser to launch via cmd /K (Default Environment Test):") # Added note to log
627
+ self.log_info(f"Calling CreateProcessAsUser to launch via cmd /K (Restored Environment Block):") # Updated log note
629
628
  self.log_info(f" lpApplicationName: {lpApplicationName}")
630
629
  self.log_info(f" lpCommandLine: {lpCommandLine}")
631
630
  self.log_info(f" lpCurrentDirectory: {cwd if cwd else 'Default'}")
632
631
  self.log_info(f" dwCreationFlags: {creation_flags} (CREATE_NEW_CONSOLE)")
633
632
 
634
- # CreateProcessAsUser call with env = None
633
+ # CreateProcessAsUser call with restored env
635
634
  hProcess, hThread, dwPid, dwTid = win32process.CreateProcessAsUser(
636
635
  token, # User token
637
636
  lpApplicationName, # Application name (None)
@@ -640,7 +639,7 @@ class GuardService(win32serviceutil.ServiceFramework):
640
639
  None, # Thread attributes
641
640
  False, # Inherit handles
642
641
  creation_flags, # Creation flags (CREATE_NEW_CONSOLE)
643
- env, # Environment block (Now None)
642
+ env, # Environment block (Restored)
644
643
  cwd, # Current directory for cmd.exe
645
644
  startup # Startup info
646
645
  )
@@ -744,13 +743,14 @@ class GuardService(win32serviceutil.ServiceFramework):
744
743
  $trigger = New-ScheduledTaskTrigger -AtLogOn # Keep AtLogOn as a fallback?
745
744
  # --- Let's stick to ONE trigger type first. Replacing AtLogOn with Event ---
746
745
  # $trigger = New-ScheduledTaskTrigger -AtLogOn -User "{username}"
747
- $trigger = New-ScheduledTaskTrigger -Event -LogName $logName -Source $source -EventId $eventIDs[0] # Primary trigger
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
748
  # Register additional triggers if needed, or handle logic differently.
749
749
  # For simplicity, let's try one event trigger first (ID 21). If reconnect (25) is needed, we can add it.
750
750
  # Consider adding delay: -Delay 'PT15S' # Delay 15 seconds after event?
751
751
 
752
752
  $settings = New-ScheduledTaskSettingsSet -AllowStartIfOnBatteries -DontStopIfGoingOnBatteries -ExecutionTimeLimit (New-TimeSpan -Days 9999) -RestartCount 3 -RestartInterval (New-TimeSpan -Minutes 1)
753
- $description = "Runs OOTB Application (via cmd) for user {username} upon session connect (Event Trigger)." # Updated description
753
+ $description = "Runs OOTB Application (via cmd) for user {username} upon session connect (Event Trigger, 15s Delay)." # Updated description
754
754
 
755
755
  # Unregister existing task first (force) - Use the NEW task name
756
756
  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.133
3
+ Version: 0.0.134
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=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=Nrgl6r4t6wkjcbgICywIXCvwVSzjisU9pKRk74R5eRk,45912
5
+ computer_use_ootb_internal/guard_service.py,sha256=FZRTjK5qtm7vHmhIAAsZ_A2vW7FLpwNrjPnQuUimhmA,45917
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.133.dist-info/METADATA,sha256=jU8pSTt7zrwWwdNXy2csNNzntUuA5dQJld6Auymmuwg,1048
37
- computer_use_ootb_internal-0.0.133.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
38
- computer_use_ootb_internal-0.0.133.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
39
- computer_use_ootb_internal-0.0.133.dist-info/RECORD,,
36
+ computer_use_ootb_internal-0.0.134.dist-info/METADATA,sha256=NkwvbfbSOP9LVYTyvigE4CmgWpBINIKf2jHXR9ezpOM,1048
37
+ computer_use_ootb_internal-0.0.134.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
38
+ computer_use_ootb_internal-0.0.134.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
39
+ computer_use_ootb_internal-0.0.134.dist-info/RECORD,,