<div dir="ltr">Dennis, Eryk,<div><br></div>Thank you for your responses. The results for assoc and ftype are the same on my machine (should be tested on person C's pc, too). <div><br></div><div>The space in filepath was one of my first guesses, but unfortunately I was not able to reproduce the error by putting a space in the filepath. But as Eryk you pointed out, there must be a file with a matching filename in order to get an error. This would explain why it is not reproducible.<div><br></div><div>Here are some of my test results:</div><div><br></div><div>Used test code</div><div>===========</div><div><font face="monospace">from pathlib import Path<br>import win32process  # from pywin32<br><br><br>(h_process, _, dw_process_id, _) = win32process.CreateProcess(<br>    None,  # module name<br>    r"C:\tmp\first second\some.exe" , <br>    None,  # Process handle not inheritable.<br>    None,  # Thread handle not inheritable.<br>    0,  # Set handle inheritance to FALSE.<br>    0,  # Creation flags.<br>    None,  # Use parent's environment block.<br>    None,  # If None - use parent's starting directory.<br>    win32process.STARTUPINFO(),<br>)  # STARTUPINFO structure.</font><br></div><div><font face="monospace"><br></font></div><div><br></div><div>Test  1</div><div>======</div><div>- Create broken exe with notepad (empty file)</div><div>- Broken exe at: C:\tmp\first.exe (or C:\tmp\first without .exe)</div><div>- Working exe at C\tmp\first second\some.exe</div><div>-> The broken exe is found first:</div><div><br></div><div><font face="monospace">Traceback (most recent call last):<br>  File ".\testfix.py", line 5, in <module><br>    (h_process, _, dw_process_id, _) = win32process.CreateProcess(<br>pywintypes.error: (193, 'CreateProcess', '%1 is not a valid Win32 application.')</font><br></div><div><br></div><div><br></div><div>Test 2</div><div>=====</div><div>- Same as Test 1, but use quoted string as the <span style="background-color:rgb(250,250,250);color:rgb(23,23,23);font-family:SFMono-Regular,Consolas,"Liberation Mono",Menlo,Courier,monospace;font-size:14px;white-space:pre">lpCommandLine (</span>r'"C:\tmp\first second\some.exe"')</div><div>-> The 

C\tmp\first second\some.exe starts without problems.</div><div><br></div><div>So the problem might be that on the Person C's computer, there is actually a file called "first" that is creating the error. The reason why I was using 

win32process.CreateProcess like this was that I'm actually using pywinauto, which uses 

win32process.CreateProcess. I'll have to still test this, but apparently this will fix some possible bugs. Thank you! </div><div><br></div><div> - Niko</div><div><font face="monospace"><br></font></div></div></div>