C
C#17mo 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
ChucklesTheBeard17mo ago
make your app handle a flag like --tray or --background, use that flag in the command windows uses to start it
marsastro
marsastro17mo 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
marsastro17mo ago
Startup apps as defined by windows here:
marsastro
marsastro17mo 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
Buddy17mo ago
HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run is where the startup keys are stored
ChucklesTheBeard
ChucklesTheBeard17mo ago
flux's startup entry is just flux.exe /noshow and everything in there has some similar flag, like I said 😛
jcotton42
jcotton4217mo ago
Autoruns for Windows - Sysinternals
See what programs are configured to startup automatically when your system boots and you login.
jcotton42
jcotton4217mo ago
this shows absolutely everything that autostarts search for it in there
Accord
Accord17mo 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
marsastro17mo ago
Thanks, that fixed it!
Want results from more Discord servers?
Add your server
More Posts
❔ Board Game (Marvel Champions) Gameplay Simulator - deep clone is very inefficientI have coded a program that simulates X games of Marvel Champions (a living card game by FFG). It wo❔ Problem of collections blocking when they shouldn't (BlockingCollection/ConcurrentQueue)Hello there, I have a problem with the producer-consumer patron in an application in net 6 (console❔ How do i run a c# programHello I wrote a new program in .txt file, how do i run this? It goes: Console WriteLine ()"Hello Wor✅ WPF SliderHello, I've bind my array of double to my slider but i do not know how to use the slider in order toCross Thread operation not valid: control 'CardStatusField' acessed from a thread other than the thr```c namespace Project1 { public partial class Form1 : Form { NFCReader NFC = new NF❔ ✅ Splitting string without allocationI'm writing a JsonConverter for Vector3 and I'd like to do this without allocating too much memory. ❔ How to correctly use Roslyn to parse RegionDirectiveTriviaSyntax in a project?I would like to ask a question about parsing syntax tree for #region preprocessor directive. For exa❔ How to rebuild searchable PDF to PDF with digital textI have already got searchable PDF, but that wasnt in text digital, it just an image but detected tex✅ command methods not throwing any errorsmy methods for my commands, even when awaited at every reference point, aren't throwing errors that ❔ Beginner Project IdeaHey I'm a beginner and looking to work on a project: I'm beginner with C# using a app called " solo