computer-use-ootb-internal 0.0.128__py3-none-any.whl → 0.0.130__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.
@@ -616,15 +616,42 @@ class GuardService(win32serviceutil.ServiceFramework):
616
616
  token = win32ts.WTSQueryUserToken(session_id)
617
617
  env = win32profile.CreateEnvironmentBlock(token, False)
618
618
  startup = win32process.STARTUPINFO()
619
- startup.dwFlags = win32process.STARTF_USESHOWWINDOW
620
- startup.wShowWindow = win32con.SW_HIDE
621
- creation_flags = win32process.CREATE_NEW_CONSOLE | win32process.CREATE_UNICODE_ENVIRONMENT
622
- user_profile_dir = win32profile.GetUserProfileDirectory(token)
623
-
619
+ # No need to hide the window now, cmd /K will keep it open.
620
+ # startup.dwFlags = win32process.STARTF_USESHOWWINDOW
621
+ # startup.wShowWindow = win32con.SW_HIDE
622
+ creation_flags = 0x00000010 # CREATE_NEW_CONSOLE
623
+
624
+ # --- Launch via cmd /K ---
625
+ # Use cmd.exe to launch the target, keeping the window open
626
+ lpApplicationName = None # We specify cmd.exe in the command line
627
+ # Ensure target path is quoted correctly within the command string
628
+ # self.target_executable_path should already be quoted if needed
629
+ lpCommandLine = f'cmd.exe /K "{self.target_executable_path}"'
630
+
631
+ # Determine CWD for the cmd process (can be None to use default)
632
+ cwd = os.path.dirname(self.target_executable_path.strip('"')) if os.path.dirname(self.target_executable_path.strip('"')) != '' else None
633
+ # --- End Launch via cmd /K ---
634
+
635
+ self.log_info(f"Calling CreateProcessAsUser to launch via cmd /K:")
636
+ self.log_info(f" lpApplicationName: {lpApplicationName}")
637
+ self.log_info(f" lpCommandLine: {lpCommandLine}")
638
+ self.log_info(f" lpCurrentDirectory: {cwd if cwd else 'Default'}")
639
+ self.log_info(f" dwCreationFlags: {creation_flags} (CREATE_NEW_CONSOLE)")
640
+
641
+ # CreateProcessAsUser call
624
642
  hProcess, hThread, dwPid, dwTid = win32process.CreateProcessAsUser(
625
- token, self.target_executable_path,
626
- None, None, False, creation_flags, env, user_profile_dir, startup
643
+ token, # User token
644
+ lpApplicationName, # Application name (None)
645
+ lpCommandLine, # Command line (cmd.exe /K "...")
646
+ None, # Process attributes
647
+ None, # Thread attributes
648
+ False, # Inherit handles
649
+ creation_flags, # Creation flags (CREATE_NEW_CONSOLE)
650
+ env, # Environment block
651
+ cwd, # Current directory for cmd.exe
652
+ startup # Startup info
627
653
  )
654
+
628
655
  self.log_info(f"CreateProcessAsUser call succeeded for user '{user}' (PID: {dwPid}). Checking existence...")
629
656
  win32api.CloseHandle(hProcess)
630
657
  win32api.CloseHandle(hThread)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: computer-use-ootb-internal
3
- Version: 0.0.128
3
+ Version: 0.0.130
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=NrwrJ9tVSfSnWofb6-jPVPVvJYyBCQ2_Y2a_OIH2tRY,40324
5
+ computer_use_ootb_internal/guard_service.py,sha256=llX4LwVHtkuEwDo22zSTcfTwbSUtV8LHqRJ1mQY60yM,42257
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.128.dist-info/METADATA,sha256=EL40z-IzeBZx1GvFiD_Kqm23C2QuHbItJ2UgKOLJTZw,1048
37
- computer_use_ootb_internal-0.0.128.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
38
- computer_use_ootb_internal-0.0.128.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
39
- computer_use_ootb_internal-0.0.128.dist-info/RECORD,,
36
+ computer_use_ootb_internal-0.0.130.dist-info/METADATA,sha256=aa0FwxmrC7SAWdR9sNz2yH5VXvRCw2dCBpKX-O5sMN4,1048
37
+ computer_use_ootb_internal-0.0.130.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
38
+ computer_use_ootb_internal-0.0.130.dist-info/entry_points.txt,sha256=bXfyAU_qq-G1EiEgAQEioXvgEdRCFxaTooqdDD9Y4OA,258
39
+ computer_use_ootb_internal-0.0.130.dist-info/RECORD,,