Run without logon?

Here you are welcome to discuss items of general interest related to Push2Run
Post Reply
TheNoiseThatCowsMake
Posts: 2
Joined: Mon Sep 03, 2018 8:00 am

Run without logon?

Post by TheNoiseThatCowsMake »

Hi,

I'm trying to get this going on my server (Windows Server 2012 R2). I've already got it up and running on my desktop so figured it should be simple. I've installed and set it up on an account on my server. When logged on interactively all works as expected. Of course this is a headless server so I don't want it sat logged on. I've therefore used task scheduler to create a task to run P2R a as the same user account at startup (without requiring interactive logon). When P2R is run through this task however my commands don't seem to work.

Does the program not support being run without an interactive desktop? Or would I need to create a Windows Service for this (rather than using task scheduler)?

Any help would be greatly appreciated as it'll make things nice and simple to control some of my server's services from my Google Home.

Cheers,
Dean
RobLatour
Site Admin
Posts: 1016
Joined: Mon Feb 19, 2018 11:43 am

Re: Run without logon?

Post by RobLatour »

Push2Run will not work as a service as it has a gui interface; something that is not supported by WIndows when running in session 0 (i.e. as a service).

You could have your server auto logon to an account if you are ok with that, here is how:

1. Click the Window's start icon, type netplwiz, and then press Enter.
2. In the User Accounts dialog box, click the account you want to automatically log on to. If it is available, clear the Users Must Enter A User Name And Password To Use This Computer check box.
3. Click OK.
4. In the Automatically Log On dialog box, enter the user’s password twice and click OK.

Once done, in Push2Run go to Actions - Options - Startup - and check 'start Push2Run' when you log on to Windows' if it is already not checked.
TheNoiseThatCowsMake
Posts: 2
Joined: Mon Sep 03, 2018 8:00 am

Re: Run without logon?

Post by TheNoiseThatCowsMake »

Thanks for the info. It's a little disappointing. I may investigate an auto-logon solution with a startup command to lock the machine. I would rather not have it log on though.

I wasn't aware that having a gui would make it so restrictive. I've been able to run other applications as services without issue- such as Plex Media Server (granted only a tray icon), and uTorrent.
RobLatour
Site Admin
Posts: 1016
Joined: Mon Feb 19, 2018 11:43 am

Re: Run without logon?

Post by RobLatour »

A good while back I used Firedaemom ( http://www.firedaemon.com/product/firedaemon-pro ) with another product of mine with a gui to allow it to run as a service. However, things got more complicated with W10 and I'm not sure if it works with it or not. However, their web page says it works with W2012 R2 which is what you said you are using. Sadly, its not free. But if you run into a need for it you may want to keep it in mind.
somethingLeft
Posts: 1
Joined: Thu Sep 30, 2021 6:30 pm

Re: Run without logon?

Post by somethingLeft »

I thought I'd give you a hand.
You can have your server lock after x seconds (60 in the example) with this.
Just slap it into a scheduled task that runs on logon.
Make 60 a bigger number if a minute isn't long enough although I think things should continue loading even if it's locked.

Code: Select all

PowerShell -Command "Start-Sleep 60; Invoke-Command {rundll32.exe user32.dll,LockWorkStation}"
RobLatour
Site Admin
Posts: 1016
Joined: Mon Feb 19, 2018 11:43 am

Re: Run without logon?

Post by RobLatour »

@somethingLeft thanks for the suggestion
Post Reply