Mpos открытый режим полного экрана киоска при двойном дисплее

For a retailer, every saved “click” is appreciated, and the ability to remove any noise appreciated.

When starting MPOS in maximum mode, you will often see that you have a title bar at the top, and the app-bar at the bottom.

Mpos открытый режим полного экрана киоска при двойном дисплее

In windows 10 you can also use the “tablet-mode” to get the MPOS into full screen mode.

BUT! If you have a dual display setup, it the tablet mode does not work.

If you want to remove them, there is a smart keyboard short-cut:

This will put the MPOS in full screen mode, and giving a nicer appearance without the bar’s.

Then the questions is how to make this always happen, when starting the MPOS ? This was actually not a easy task, but a colleague of me (Espen) made it possible , du using a powershell script.

Mpos открытый режим полного экрана киоска при двойном дисплее

Add this to a “start up folder”, and create a new powershell script containing ;

Then create a shortcut towards this new powershell app.

How initial investigations (by Sven Erik) shows that the MPOS app ID is and let’s hope this ID stay’s permanent.

Mpos открытый режим полного экрана киоска при двойном дисплее

Short Description:
If pwsh/powershell is not running Maximized, re-open it Maximized

I have installed pwsh and wt, with pwsh as the default console in wt, and in some scripts, I want wt to run Maximized (wt doesn’t run in Maximized by default. I don’t want to set it).

In this .ps1, what code is needed to determine if wt is not running fullscreen/maximized, re-opening it in Maximized if it’s not?

# demo.ps1
#$IsMax =
If (!$IsMax) { wt.exe -M PWSH $PSCommandPath; exit 0
}
pause

Mr.Key7's user avatar

1 silver badge11 bronze badges

You can for example:

  • get the parent Windows Terminal process of the PowerShell script:
(Get-WmiObject Win32_Process -Filter "ProcessId = $PID").ParentProcessId
(Get-Process -Id $PID).Parent.Id
  • check if it the process with that ID is fullscreen. There’s no easy way to do so as PS APIs are lacking such data, but a workaround could be to check CommandLine property of the process to check if it was launched in fullscreen with -F/-FullScreen. That of course won’t consider the case of you switching to/from fullscreen with a keyboard shortcut or in any non-CLI way.

  • relaunch Windows Terminal in fullscreen with whatever you’d like to run, e.g.:

wt -F -d "$(pwd)" somescript.ps1

where -F is the arg for fullscreen.

:/>  Работа с сетью в командной строке Windows (CMD) часть 1 - uzverss — ЖЖ

Considering the 2nd bullet point, I don’t think it’s worth going for a fully optimal solution just to save a few seconds every now and then. I’d recommend always relaunching in fullscreen instead.

Destroy666's user avatar

10 gold badges22 silver badges43 bronze badges

To have Windows Terminal launch in full-screen mode :

  • Enter Settings, section Startup
  • Open branch “Launch parameters”
  • Change “Launch mode” to “Full screen”.

Note that pressing F11 in Terminal will switch between the
full screen and normal modes.

harrymc's user avatar

After googling and doing some testing, I finally found what I wanted.

If WT isn’t maximized, then restart it maximized

Based on: Determine Size of PowerShell Console
To check whether it’s maximized or not, by looking for $Host.UI.RawUI.WindowSize.Width

$IsWTRun = 'WindowsTerminal' -in (Get-Process).Name
# WindowSize.Width while Maximized: WT=95, NotWT=103 (in my PC)
If ($IsWTRun) {$WID = 95} else {$WID = 103}
$IsMax = $Host.UI.RawUI.WindowSize.Width -eq $WID
if ( $IsMax ) {'in M.A.X.I.M.I.Z.E.D'; pause; exit 0}
$PS7 = $Host.Version.Major -eq 7
if ( $PS7 ) {wt.exe -M PWSH $PSCommandPath; exit 0}
$AL = "-M -d `"$PSScriptRoot`" -p `"Windows PowerShell`"", "PowerShell -NoProfile -ExecutionPolicy Bypass -File `"$PSCommandPath`""
start wt.exe -ArgumentList $AL ; exit 0

Thanks for everyone who helped by answer or comment

Mr.Key7's user avatar

1 silver badge11 bronze badges

Using the Set-AssignedAccess PowerShell cmdlet

A screenshot of a computer Description automatically generated

  • A Windows UWP app must be provisioned or installed for the assigned access account before they can be selected as the assigned access app.
  • A local standard user account that will be used for the assigned access.

Note: Apps that are generated using the Desktop App Converter (Desktop Bridge) can’t be used as kiosk apps.

Using the Kiosk Browser UWP app

In the previous post, we set up the Kiosk mode to use the Edge browser. However, since the latest version of Edge, the Chromium version, is a desktop/Win32 app. Unfortunately, it cannot be used for this scenario because the Set-AssignedAccess cmdlet only supports UWP (AppX and MSIX) applications.

So in this example, we will be using the Kiosk Browser application that is available in the Microsoft App Store (Kiosk Browser – Microsoft Apps).

A screenshot of a computer Description automatically generated

A screenshot of a computer Description automatically generated

Adding Kiosk Browser as a provisioned app

Mpos открытый режим полного экрана киоска при двойном дисплее

Mpos открытый режим полного экрана киоска при двойном дисплее

Creating an assigned access account

A screenshot of a computer Description automatically generated

Getting the AUMID for the Kiosk Browser app

A screenshot of a computer program Description automatically generated

Executing the Set-AssignedAccess cmdlet

Now we can execute the Set-AssignedAccess cmdlet using the assigned access account name and AUMID for the Kiosk Browser app.

:/>  Где находится папка temp в Windows 7, темп файлы

A screenshot of a computer screen Description automatically generated

Restarting and testing

Next, we will need to restart the device.

Mpos открытый режим полного экрана киоска при двойном дисплее

After the device has restarted, we will need to sign in with the new Kiosk account, specifying the local account with “.\Kiosk” and entering the password.

A screenshot of a login screen Description automatically generated

Since it is a new account, the profile will be created at first logon.

A screenshot of a blue screen Description automatically generated

Once the Kiosk account has signed in, the Kiosk Browser window will appear in full screen. The kiosk mode prevents access to the Start menu or anywhere else on the desktop and all keyboard shortcuts will be disabled.

A screenshot of a computer Description automatically generated

The Kiosk Browser app interface is restricted further with no toolbars or navigation buttons, or keyboard shortcuts. This may be more suitable for public browsing or product demo kiosk devices.

A screenshot of a computer Description automatically generated

Using the Clear-AssignedAccess PowerShell cmdlet

A screenshot of a computer Description automatically generated

A screenshot of a computer program Description automatically generated

Next in the series, we will look at how to set up Windows Kiosk mode with Intune.

I want to create a power shell script that can launch my web application on Chrome.
Also to launch it in maximized window size.

Below is the related ps1 code:

 $flags = "--app=$appUrl --start-maximized " (New-Object -ComObject WScript.shell).Run('chrome.exe ' + $flags)

The result is, the web app launched, but it is not launching in full screen. So the “–start-maximized” switch didn’t work for me.

Then I tried the exactly same script on other people’s computer, and it works fine with maximized window. Why is this different between computers? We all using windows system.

I have also tried 2 other things on my system:

  1. Change “chrome.exe” to “msedge.exe”. It works fine, Edge will launch my app in max size screen.
  2. Change the appURL to “www.google.com”, it works fine, Chrome will launch google.com in max size screen.

Is there any chrome setting to accept the flags? I have been searching online for a while, but I can’t find anything related to this.


A bonus question: When it is working. The –start-maximized will be used and launch my app in maximized screen, but it will also makes the child windows that opened by my app in maximized screen. Is there another flag that only works for the main window, not for the child window?

:/>  ТОП-3 способа отменить задачи на ПК!

I use buttons on my mouse to switch between virtual desktops. When RDP is in full screen mode, you have to do a special key combination (CTRL+ALT+HOME then CTRL+ALT+Left / Right)

So I have two buttons, one to go left, one to go right.

I wanted to make my connection go full screen with windows key passthrough on separate virtual desktops.

So I made a powershell script to accomplish this workflow. It takes two parameters:

desktopname and remove

desktopname is the name of the virtual desktop, to which I pass $Name%
remove is boolean, $true or $false

So you take the powershell script, and make two command tasks, one to open the virtual desktop and switch to it, the other to close it

You set the tasks on the connection or the folder, wait it to complete before connecting.  When you open a connection, powershell creates a virtual desktop with the connection name, switches to it, the returns to RoyalTS, which opens full screen.

When you disconnect, powershell removes the virtual desktop with the connection name.

It’s not perfect, but it works well enough for me – and could probably be improved.

In the task, the command is the path to pwsh.exe on your machine. The working folder is the path to where you put the powershell script.

Arguments looks something like this: 

(to open)
 -WindowStyle Hidden -NoProfile -Command .\rtsVirtDesktop.ps1 -desktopname ‘$Name$’

(to close)
-WindowStyle Hidden -NoProfile -Command .\rtsVirtDesktop.ps1 -desktopname ‘$Name$’ -remove $true

Note the quotes around $Name$, to handle spaces in connection name.

WindowStyle Hidden is ignored because RoyalTS opens a window anyway to run this. Not an issue.

Import-Module -Name VirtualDesktop

if ($remove -eq $true)