this post was submitted on 14 Sep 2023
8 points (100.0% liked)

Windows 11

849 readers
2 users here now

Welcome to the community for Windows 11, Microsoft's latest computer operating system.

Rules:

founded 1 year ago
MODERATORS
 

Here's my situation:

I've got a minecraft server running inside a restricted Windows user account, and I'm using a main account for everything else. So, two Windows user accounts are always logged on simultaneously.

With both users logged in, this works quite well, and I've got not issues.

However, it seems that Windows closes the minecraft server user account for being idle at least once every 24h... how can I prevent it from doing that? I literally want that account running in the background 24/7 unless I log out.

Any ideas?

UPDATE: For anyone who has the same request, I ended up finding a small app that sends a keystroke every so often, and lets windows know that there's still an active user present. Almost like a mouse jiggler, but with a keystroke. There are several of these apps available, and most are called "caffeine" or some variant of that. LOL Been running this app for nearly a week and the user remains logged in :)

top 6 comments
sorted by: hot top controversial new old
[–] Blaster_M 4 points 1 year ago (1 children)

Maybe run a virtual machine and plunk the server inside it. Just get a very lightweight linux, put it in Hyper-V or VirtualBox if you don't have Pro, and there you go. Separated and containerfied.

[–] [email protected] 1 points 1 year ago

That could be another option, but seriously, is there no way to prevent Windows from automatically logging out idle users?

[–] slazer2au 2 points 1 year ago (1 children)

Can you run the application as a service as opposed to via a user account?

[–] [email protected] 3 points 1 year ago

The server is being run from a batch script (command prompt) and then has a java applet running alongside it, but I don't want it to be running through my main account (hence the separation).

The way it's been working out has been great, but this logging out business needs to stop. LOL

[–] habitualTartare 1 points 1 year ago (1 children)

Not the best security practice but to answer you question, there is likely a policy setting in the registry or via policy you could change. This one should be set to 0. You could also maybe run a program of some sort via task scheduler as a workaround (to mimic mouse/keyboard input via autohotkey or using a "keep PC awake" variable? This also has better suggestions. If it's logging off while you're not using the PC, it may be that the computer is entering a sleep state.

[–] [email protected] 1 points 1 year ago

Thank you! I think the Interactive logon machine setting might be what I'm looking for. The machine is actually in use quite often and all sleep/screensaver options have been disabled (It's a mini-PC hooked up to a TV, so it acts as our multimedia device while running the minecraft server in the second account.