@TimS
I found the clicking the screen every X minutes method was sub optimal so I went a different route. If the Xibo team could integrate this type of functionality (and a 64-bit Windows client and CefSharp alternative
) it would really improve the usability of Xibo. I want to try to beta Linux client.
Files deployed via GPO, and script executed via scheduled task GPO.
This effectively “disables” the taskbar entirely as I found even autohide doesn’t work reliably. It also closes the start menu automatically if it opens in addition to checking and forcing the Xibo client on top every 5 seconds. If you need to make changes to the computer, ALT+F4 the Xibo client window and then you should be able to use the start menu or open Task Manager, etc.
CloseStartMenu.vbs
Set objShell = CreateObject("WScript.Shell")
objShell.SendKeys "{ESC}"
RunXiboAlwaysOnTop.vbs
Dim objShell
Set objShell = CreateObject("WScript.Shell")
objShell.Run "powershell.exe -ExecutionPolicy Bypass -NoProfile -WindowStyle Hidden -File C:\Scripts\XiboAlwaysOnTop.ps1", 0, False
Set objShell = Nothing
XiboAlwaysOnTop.ps1
# XiboAlwaysOnTop.ps1 - Ensures Xibo stays on top and forcefully hides the Start Menu & taskbar
$logFile = "C:\Scripts\XiboOnTop.txt"
# Function to write logs
Function Write-Log {
param ([string]$message)
$timestamp = Get-Date -Format 'yyyy-MM-dd HH:mm:ss'
Add-Content -Path $logFile -Value "[$timestamp] $message"
}
Write-Log "Script started."
# Load User32 DLL for Windows API functions
Add-Type @"
using System;
using System.Runtime.InteropServices;
public class User32 {
[DllImport("user32.dll")]
public static extern bool SetForegroundWindow(IntPtr hWnd);
[DllImport("user32.dll")]
public static extern bool ShowWindow(IntPtr hWnd, int nCmdShow);
[DllImport("user32.dll")]
[return: MarshalAs(UnmanagedType.Bool)]
public static extern bool SetWindowPos(IntPtr hWnd, IntPtr hWndInsertAfter,
int X, int Y, int cx, int cy, uint uFlags);
[DllImport("user32.dll")]
public static extern IntPtr FindWindow(string lpClassName, string lpWindowName);
[DllImport("user32.dll")]
public static extern bool MoveWindow(IntPtr hWnd, int X, int Y, int nWidth, int nHeight, bool bRepaint);
[DllImport("user32.dll")]
public static extern bool ShowWindowAsync(IntPtr hWnd, int nCmdShow);
public static IntPtr HWND_TOPMOST = new IntPtr(-1);
public static IntPtr HWND_NOTOPMOST = new IntPtr(-2);
public static IntPtr HWND_BOTTOM = new IntPtr(1);
public const int SW_HIDE = 0;
public const int SW_SHOW = 5;
public const int SW_RESTORE = 9;
public const int SW_MAXIMIZE = 3;
public const UInt32 SWP_NOMOVE = 0x0002;
public const UInt32 SWP_NOSIZE = 0x0001;
public const UInt32 SWP_SHOWWINDOW = 0x0040;
public const UInt32 SWP_NOACTIVATE = 0x0010;
}
"@
while ($true) {
try {
# Check if XiboClient.exe is running
$xiboProcess = Get-Process XiboClient -ErrorAction SilentlyContinue | Where-Object { $_.MainWindowTitle -eq "Xibo" }
if ($xiboProcess) {
Write-Log "XiboClient.exe detected. Setting to topmost."
# Get the window handle
$xiboHandle = $xiboProcess.MainWindowHandle
if ($xiboHandle -ne 0) {
# Hide the taskbar completely
$taskbarHandle = [User32]::FindWindow("Shell_TrayWnd", $null)
if ($taskbarHandle -ne [IntPtr]::Zero) {
[User32]::ShowWindowAsync($taskbarHandle, [User32]::SW_HIDE)
Write-Log "Taskbar hidden."
}
# Check if Start Menu process is running
$startMenuProcess = Get-Process StartMenuExperienceHost -ErrorAction SilentlyContinue
if ($startMenuProcess) {
Stop-Process -Name "StartMenuExperienceHost" -Force
Write-Log "Start Menu process killed."
}
# Restore and maximize Xibo to ensure full-screen display
[User32]::ShowWindow($xiboHandle, [User32]::SW_RESTORE)
Start-Sleep -Milliseconds 500
[User32]::ShowWindow($xiboHandle, [User32]::SW_MAXIMIZE)
Start-Sleep -Milliseconds 500
# Force Xibo to the foreground
[User32]::SetForegroundWindow($xiboHandle)
Start-Sleep -Milliseconds 500
# Move Xibo to absolute fullscreen (covering taskbar & other windows)
$screenWidth = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Width
$screenHeight = [System.Windows.Forms.Screen]::PrimaryScreen.Bounds.Height
[User32]::MoveWindow($xiboHandle, 0, 0, $screenWidth, $screenHeight, $true)
Write-Log "Xibo forced to fullscreen."
# Ensure Xibo remains on top
for ($i = 0; $i -lt 5; $i++) {
[User32]::SetWindowPos($xiboHandle, [User32]::HWND_TOPMOST, 0, 0, 0, 0,
[User32]::SWP_NOMOVE -bor [User32]::SWP_NOSIZE -bor [User32]::SWP_SHOWWINDOW)
Start-Sleep -Seconds 2
}
Write-Log "Successfully set Xibo to topmost."
} else {
Write-Log "ERROR: Xibo process found but window handle is 0."
}
} else {
Write-Log "WARNING: XiboClient.exe process not found. Retrying in 5 seconds..."
}
} catch {
Write-Log "ERROR: $_"
}
# Sleep for 5 seconds before checking again
Start-Sleep -Seconds 5
}