C
C#2y ago
marsastro

✅ Make process believe it's a startup app?

Hello! So I'm building an app that starts another app. The app in question seems to behave differently depending on whether it was manually started or started as a startup app. When it's started through windows startup app system, it starts as an icon in the taskbar corner. However, when I manually start it, run it through Task Scheduler, or start it from my app, it starts with a window open that has to be manually closed for it to hang out in the taskbar corner like it does on startup. I'm not quite sure how it achieves this. I assume that Windows either supplies some arguments when it starts an app, or this app has some other way to figure out that it was started by windows automatically. The app in question is f.lux. Anyone have any idea how I can make it behave the same way when started manually? Like emulate the way windows launches apps through the startup procedure?
10 Replies
ChucklesTheBeard
make your app handle a flag like --tray or --background, use that flag in the command windows uses to start it
marsastro
marsastroOP2y ago
I think you misunderstood. It's not my app that's supposed to behave differently on startup, I'm launching a different app made by someone else that already behaves differently on startup. I'm trying to start that app the same way windows does on startup, to replicate the behavior the app has when it's started by windows. I have no control over how this app runs, I can only try to do the same thing windows does when launching it on startup.
marsastro
marsastroOP2y ago
Startup apps as defined by windows here:
marsastro
marsastroOP2y ago
flux.exe is the app in question When I log in, the app doesn't open a window. When I launch it manually from the .exe file, or through Task Scheduler, or through my app, it does open a window that I then have to close. I want to open it invisibly like it's done when my computer boots When I click "open file location" it takes me to the same .exe file I use, so it's not a shortcut with launch options any idea where I would look in the registry editor? I've looked at the properties through task manager and can't really see anything special isn't CCleaner for removing stuff? How do you use it to look at registry records? You know what, I'm just gonna mail the developer. Maybe they'll let me know how they've done it.
Buddy
Buddy2y ago
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run is where the startup keys are stored
ChucklesTheBeard
flux's startup entry is just flux.exe /noshow and everything in there has some similar flag, like I said 😛
jcotton42
jcotton422y ago
Autoruns for Windows - Sysinternals
See what programs are configured to startup automatically when your system boots and you login.
jcotton42
jcotton422y ago
this shows absolutely everything that autostarts search for it in there
Accord
Accord2y ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
marsastro
marsastroOP2y ago
Thanks, that fixed it!
Want results from more Discord servers?
Add your server