EEVblog® Electronics Community Forum
Products => Computers => Programming => Topic started by: peter-h on November 12, 2025, 02:46:24 pm
-
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
(https://peter-ftp.co.uk/screenshots/2025-11-12_1416550003.jpg)
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)
(https://peter-ftp.co.uk/screenshots/2025-11-12_1431260004.jpg)
(https://peter-ftp.co.uk/screenshots/2025-11-12_1444490005.jpg)
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 :)
-
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.
-
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.