Score:1

scheduled task to logon to remote windows 10

cn flag

I need to start some services on another Win10 machine every day which is not available as Service, and requires that someone logs on to the windows machine. The only way to do this is to login to this win machine and then locks it.

Is there any way to create a scheduled task (on another machine) to connect and logon to remote computer?

bjoster avatar
cn flag
Have you tried starting your application as a "hand made" service, for example with [NSSM](https://nssm.cc/)?
Score:1
in flag

You could maybe use a remote desktop connection with settings for which programs to run on the remote, note that this do require that you already are loged in on the local machine to have a desktop to render to. There might also be other RDP clients that you could run from console.

Another approach could be to have automatic logon for a separate user on the other machine using https://docs.microsoft.com/en-us/troubleshoot/windows-server/user-profiles-and-logon/turn-on-automatic-logon And then autorun the programs and finally lock the computer.

To lock the computer use Rundll32.exe user32.dll,LockWorkStation

cn flag
For the first suggestion, I m not sure how to do that exactly. And checking second suggestion.
cn flag
how to lock computer automatically after certain time of login
in flag
Updated with command to lock, you do not need a timeout, but I would recommend that you use a script cmd/powershell that runs from `%appdata%\Microsoft\Windows\Start Menu\Programs\Startup` the lock command can be anywhere in there, even at the top, the rest of the commands will keep on running even if the desktop gets locked
Daniel avatar
in flag
Rather than placing a script in the start menu's startup folder, you should prefer to create a scheduled task that triggers on log on.
cn flag
thanks, this worked.
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.