gravelking
Goto Top

Windows APP Always on Top starten

Hallo zusammen,

irgendwie stehe ich gerade auf dem Schlauch.
Ein Grafana Dashboard wurde über den MS Edge als APP installiert.
Diese App soll nun beim Systemstart geladen werden, und zwar so, das Sie "AlwaysOnTop" ist.
Die üblichen Verdächtigen habe schon versucht (MS PowerToys, DeskPins etc.) allerdings ohne Erfolg.

Wäre super, wenn mir jemand einen Tipp geben könnte, wie ich das realisieren kann.

Grüße

Content-Key: 4903243710

Url: https://administrator.de/contentid/4903243710

Printed on: May 5, 2024 at 02:05 o'clock

Member: firefly
firefly Dec 09, 2022 at 12:51:15 (UTC)
Goto Top
Für welche Windows Version denn?
Mitglied: 4863114660
Solution 4863114660 Dec 10, 2022 updated at 09:08:21 (UTC)
Goto Top
Bitte: SetWindowPos ist dein Freund, is ja nix anderes als ne Edge Instanz
Powershell GUI immer im Vordergrund
https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-s ...

Als Alternative starte den Edge halt einfach im Kiosk-Modus, oder gleich als Windows Shell.

Sample
Add-Type –MemberDefinition '  
    [DllImport("user32.dll")] 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 bool SetForegroundWindow (IntPtr hWnd);' -name window -namespace Win32  
$app = start "msedge.exe" -Argumentlist '--start-fullscreen --kiosk https://administrator.de' -PassThru  
while ($app.MainWindowHandle -eq 0){sleep .5}
[void][Win32.Window]::SetForegroundWindow($app.MainWindowHandle)
[void][Win32.Window]::SetWindowPos($app.MainWindowHandle,-1,0,0,-1,-1,0x40)

Gruß S.