mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
Fix bug in Process.name + create_process show_windows=True by default
This commit is contained in:
@@ -71,7 +71,7 @@ def create_console():
|
||||
sys.stderr = console_stderr
|
||||
|
||||
|
||||
def create_process(path, args=None, dwCreationFlags=0, show_windows=False):
|
||||
def create_process(path, args=None, dwCreationFlags=0, show_windows=True):
|
||||
"""A convenient wrapper arround :func:`windows.winproxy.CreateProcessA`"""
|
||||
proc_info = PROCESS_INFORMATION()
|
||||
lpStartupInfo = None
|
||||
|
||||
@@ -802,7 +802,7 @@ class WinProcess(Process):
|
||||
buffer = ctypes.c_buffer(0x1024)
|
||||
rsize = winproxy.GetProcessImageFileNameA(self.handle, buffer)
|
||||
# GetProcessImageFileNameA returns the fullpath
|
||||
return buffer[:49].decode().split("\\")[-1]
|
||||
return buffer[:rsize].decode().split("\\")[-1]
|
||||
|
||||
@utils.fixedpropety
|
||||
def pid(self):
|
||||
|
||||
Reference in New Issue
Block a user