Installing Veyon Master from GPO
I have a GPO and a Powershell script that installs and updates Veyon at system boot time. This has been working well for the last couple of years, but there is a problem: the students and staff rarely reboot their computers. At the end of the day they just close the lids and pick up again the following day.
Mostly updates are rolled out over a period of weeks, but recently it's become apparent that some machines haven't been rebooted in months and are several versions of Veyon behind.
I want to modify my script to run as a scheduled task in background. This will work for student machines but on staff machines that have Veyon Master open the update process fails.
I can close Veyon Master process if it's open and logged in, but if it's waiting for user input (at, say, the login dialog) this doesn't work and the update fails.
Is there any way to get the installer to close Veyon Master, or any other way to guarantee that Veyon Master will close so that it can be updated?
I would build a script to force reboot every [day]-[week-end] at midnight (or shutdown 8pm to be environement friendly?).
@rnetuband The problem then is that once the lid is closed the processor is effectively off. There's no way to wake the machine up to tell it to reboot itself. I've tried that approach.
Forcibly rebooting the computers when they're in use is considered unacceptable - this is a classroom environment, after all. Rebooting them outside class time is effectively impossible since both staff and students habitually close the lid when they leave for breaks or end of day.
My only remaining option is to somehow do the update in background. Closing Veyon Master briefly for an update is, grudgingly, accepted. My best idea so far is to run the update if Veyon Master is not running, or if my attempt to close it has been successful. Otherwise, just not run the update on that occasion and wait for the next time the GPO is refreshed.
As RNETuband said a scheduled task could be used to trigger a restart of the computer after hours with the task condition checked to ‘Wake the computer to run this task’. Configure your Veyon installer GPO to run as a startup script to avoid veyon-master.exe being in memory at the time the installer runs.
Check the advanced settings of the current power plan to make sure the Sleep category has the ‘Allow wake timers – Plugged in” option set to Enable.
@itguy I've tried the out-of-hours reboot before, without success. This may be the step I was missing.. How can I set that with a GPO? That option doesn't appear in the Power Plan preferences on our system
From a command prompt enter:
powercfg -attributes SUB_SLEEP BD3B718A-0680-4D9D-8AB2-E1D2B4AC806D -ATTRIB_HIDE
There isn’t a way in Windows 7 or Windows 10 to intercept a pending sleep state to run code before entering sleep mode. You can configure a scheduled task to run on the detection of a sleep event but the action to perform (Veyon update) happens not prior to entering a sleep state but actually occurs immediately after the computer wakes. So there could be a significant time delay between when the update is queued and when the update is actually performed.
I’ve not attempted to update Veyon with the master open but once the master computer exits sleep mode veyon-master.exe would likely still be in memory so it might be necessary to end the process. You could do this by the scheduled task I mentioned or as part of another update procedure.
The command would be:
"C:\Windows\System32\taskkill.exe" /f /im veyon-master.exe
"C:\Windows\System32\taskkill.exe" /S computername /f /im veyon-master.exe