Author Topic: win11: how to schedule a program at startup and not come up hidden?  (Read 2039 times)

0 Members and 1 Guest are viewing this topic.

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 5966
  • Country: gb
  • Doing electronics since the 1960s...
I've been on this for 2 days, googled in the usual places, but nothing works. Lots of people asking the same Q. The scheduled program starts allright but is invisible.

I did an almost identical job with win7-64 and did not have any problem. Same with winXP.

I have a win11 host running VMWARE player v16, and (this is probably irrelevant) the VM is Debian 13.

The player starts (silently) and you can see it in the task manager, under Background Processes



but I cannot access it. It is set to run in the same username as I am logged into interactively (and is verified in Task Manager; username is Peter)





What I don't get is how you can have an interactive login as Peter and have an invisible program running also under Peter. Normally to achieve this, the program to be invisible is to run as a Service, but I am not doing that. When I do log in, say some hours after startup, there seems to be no way to "retrieve" that invisible program (in this case the VMWARE player).

The process actually scheduled is a .bat file containing this:

echo %USERNAME% %date% %time% starting VM >> c:\temp\vmstart.log
"C:\Program Files (x86)\VMware\VMware Player\vmplayer.exe" "C:\VM-Debian-13\Debian 13.vmx"

but I tried directly scheduling vmplayer.exe too; no difference. The log file shows the right stuff as expected:

Peter 12/11/2025 11:08:01.66 starting VM
Peter 12/11/2025 11:22:49.57 starting VM
Peter 12/11/2025 14:09:41.75 starting VM
Peter 12/11/2025 14:22:22.14 starting VM

If I run the player manually, it all works.

I tried another approach: make the startup of the batch file not Startup but User Login ("Peter") and configure auto logon (requires a registry edit)
https://learn.microsoft.com/en-us/troubleshoot/windows-server/user-profiles-and-logon/turn-on-automatic-logon
The more usual ways to do that are not in win11... No change; the player still starts and again invisible.

I would really appreciate any tips :)





« Last Edit: November 12, 2025, 03:38:02 pm by peter-h »
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 

Offline peter-hTopic starter

  • Super Contributor
  • ***
  • Posts: 5966
  • Country: gb
  • Doing electronics since the 1960s...
Re: win11: how to schedule a program at startup and not come up hidden?
« Reply #1 on: November 12, 2025, 05:21:56 pm »
In case somebody comes across this in years to come, I have solved it in a funny way.

Firstly, the Task Scheduler simply has a lot of problems like this. They vary with the windoze version...

The solution is to use the Startup directory. This ancient windows feature still exists under win11 but is well hidden; to find it you type shell:startup in the Run box.

Then I used two batch files. The 1st one is in the startup directory

rem the /min minimises the command window, which is neater
@echo off 
start "" /min "C:\Bats\startvm.bat"

and the startvm.bat is under c:\bats in this case, containing this:

echo %USERNAME% %date% %time% starting VM >> c:\temp\vmstart.log
"C:\Program Files (x86)\VMware\VMware Player\vmplayer.exe" "C:\VM-Debian-13\Debian 13.vmx"

In addition to configuring auto login (above), this produces an auto starting program which is on-screen if/when you perform a normal interactive login.
Z80 Z180 Z280 Z8 S8 8031 8051 H8/300 H8/500 80x86 90S1200 32F417
 
The following users thanked this post: SteveThackery

Online macboy

  • Super Contributor
  • ***
  • Posts: 2410
  • Country: ca
Re: win11: how to schedule a program at startup and not come up hidden?
« Reply #2 on: January 05, 2026, 01:53:05 am »
The way I solved this years ago was to have my account auto login, and auto run the command (also running a VMware VM in my case). The other part of it is to "replace" explorer (the program Windows launches for your user session) with a program which immediately locks the screen upon login, and then runs the normal explorer executable. When Windows boots up, you can just barely see that your account logs in before the screen locks. The auto start program(s) start within your user session, but your password is still required to access the session. I'm sure there is a security concern in there somewhere but for a typical home user it is a risk to be managed.
 


Share me

Digg  Facebook  SlashDot  Delicious  Technorati  Twitter  Google  Yahoo
Smf