app_paths = {
"obsidian": "C:\\Users\\athth\\AppData\\Local\\Obsidian\\Obsidian.exe",
"postman": "C:\\Users\\athth\\AppData\\Local\\Postman\Postman.exe",
# "docker": "C:\\Program Files\\Docker\\Docker\\Docker Desktop.exe",
# Add more apps and their paths here
}
for app, path in app_paths.items():
if app == "obsidian":
# Start obsidian normally
subprocess.Popen([path])
else:
# Start other apps minimized
SW_MINIMIZE = 6
startupinfo = subprocess.STARTUPINFO()
startupinfo.dwFlags |= subprocess.STARTF_USESHOWWINDOW
startupinfo.wShowWindow = SW_MINIMIZE
subprocess.Popen([path], startupinfo=startupinfo)
In this code (this is the answer given in StackOverflow previously to someone else) I cannot open postman in minimized mode. It's opening in normal windows just like the Obsidian app, I'm working in windows