I'm trying to do something simple like get calc.exe to start minimized, but it's not happening.

import subprocess
import win32gui
import win32con

info = subprocess.STARTUPINFO()
info.dwFlags |= subprocess.STARTF_USESHOWWINDOW
info.wShowWindow = win32con.SW_SHOWMINIMIZED
x = subprocess.Popen("calc.exe", startupinfo = info)

It pops up the same as always, no matter what I provide for wShowWindow.

start /MIN calc

also does not start minimized from command line, so it must be problem with the program started, not the command. The wordpad starts minimized with your code and full path (as it is not in PATH in my computer).

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.