4

All of the other "startup" questions have to do with post-login execution, when I'm trying to get a program to run when you press the power button. I'm using the application f.lux, and restart my computer a lot. I want flux to turn on and stay on before I login to the computer, so at night, I don't have to look away while I blindly type in a password and wait for the computer's hue to change.

I've tried task scheduler, gpedit, with a shortcut, a batch script, etc. Nothing seems to be working, and it just does not start up before I login. I know this, because I give it time at the login screen, and then login, and flux is not in the system tray, and the hue has yet to change, until 5 other programs start up. Is there a way for the batch file I am using (which works fine on its own) to create a log or something so I know what's wrong? Or has someone had the same problem and already has a direct answer?

START "flux" "C:\Users\Me\AppData\Local\FluxSoftware\Flux\flux.exe"

is my batch script.

3 Answers 3

2

Part of the problem here is that you're trying to start an application which needs to affect the screen.

An application started with task scheduler on start up will start before login, but it will not have any interactivity with the desktop/session, so you won't be able to see anything it does (particularly a problem for f.lux). This is also why you don't see it in the tray. Check task manager and you may see it.

There might not be any way for you get this to work on your own; it may require f.lux to be modified, but I'm on mobile so it's difficult for me too research it right now.

2
  • Thank you for the comprehensive reply. Do you think it would be possible to have it turn on at the logon screen, after all the services startup? I'll check task manager when I get home, but if all the screen and service requirements start up, I don't see why I can't get flux running right after they all finish, which should be when the login screen is there. Ideally, flux would startup before I even see the logon screen, but if not, I just need it to execute before I type in my login credentials.
    – Meyekem
    Jan 18, 2015 at 3:42
  • It's likely that flux is in fact running, but it can't interact with the screen. The problem isn't getting it to run, it's getting flux to run the same session as the login screen. If it's possible at all, it may be non trivial or may require the flux code to be changed. It seems like something other flux users might have wanted to do in the past, so there might be information out there about how to achieve it. I just can't look for it easily from my phone right now.
    – briantist
    Jan 18, 2015 at 3:56
1

To my knowledge a batch script cannot be started at startup. Your best bet would be to create or have someone create a system service which can be started at startup.

Edit: Looks like this question was alread asked and has an accepted answer at SE. See here for a way to use srvany.exe from the resource kit to do this.

3
  • Thank you for the response! I used the resource kit, and it messed up my registry, and I had to reinstall windows completely. Do you know of any other ways to do this, without going into the registry? Meanwhile, I'll try using a .vbs script insted
    – Meyekem
    Jan 17, 2015 at 22:48
  • When this is answer was useful, don't forget to upvote and / or mark it as accepted with the checkmark next to it.
    – R-D
    Jan 17, 2015 at 22:49
  • Sure, I will once I have 15 reputation...
    – Meyekem
    Jan 17, 2015 at 22:50
0

You can set some processes to start before user login using registry key HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run It does not need to be configured as a service. The problem is that it may not work because it will not be able to access the screen before a user is logged on. But you can check if the process is started this way after you login using the task manager at least.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .