Search code examples
windowspowershellprintingmicrosoft-edgekiosk-mode

How to set up Microsoft Edge Chromium in kiosk mode with silent printing?


I am trying to start Microsoft Edge with parameters in Kiosk mode via Assigned Access. A client of mine has requested that users should only be allowed to browse one specific website (in this case, users can print name tags at a reception stand).

enter image description here

Now, we can start the Edge browser without problems via Assigned Access and have it launch the specific website in full screen but when it comes to printing, a print dialogue will always appear. We want silent printing to avoid the hassle for the users. Fortunately Edge has a command line (https://learn.microsoft.com/en-us/deployedge/microsoft-edge-configure-kiosk-mode) where you can specify this:

"C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe" --kiosk https://www.example.org/ --kiosk-printing

However, this only works on when you create a shortcut to Edge on e.g. the Desktop and then launch manually - not when you start it via Assigned Access / Kiosk mode.

Show how do we add needed parameter --kiosk-printing to Kiosk mode?

TROUBLESHOOTING

1) I have thought about using PowerShell:

You can use PowerShell to configured Assigned Access / Kiosk mode.

https://learn.microsoft.com/en-us/powershell/module/assignedaccess/set-assignedaccess?view=windowsserver2019-ps

PS C:\> Set-AssignedAccess -UserName MyKioskUser -AppName "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe --kiosk https://www.example.org/ --kiosk-printing"

But that just gives an error:

PS C:\Windows\system32> Set-AssignedAccess -UserName MyKioskUser
-AppName "C:\Program Files (x86)\Microsoft\Edge\Application\msedge.exe --kiosk https://www.example.org/ --kiosk-printing" Application was not found.  Enter either a valid AppName or AUMID At C:\Windows\system32\WindowsPowerShell\v1.0\Modules\AssignedAccess\AssignedAccess.psm1:288 char:17
+                 throw $SCStringTable.ErrorAppNotFound
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : OperationStopped: (Application was...ppName or AUMID:String) [], RuntimeException
    + FullyQualifiedErrorId : Application was not found.  Enter either a valid AppName or AUMID

2) Group Policy?

Group Policy could perhaps be a way to enforce settings for an application like Microsoft Edge but I do not know how to configure that. Any feedback welcome.

3) Maybe edge://policy would work?

Edge has a lot of different policies/settings you can configure according to this https://learn.microsoft.com/en-us/DeployEdge/microsoft-edge-policies#printing but there are no policy for silent printing.

4) Is it possible to run a bat file instead?

If Kiosk mode would allow for a custom app to run like a .bat file I could simply call that file and my problems would be solved. However, it seems you cannot even run a .bat file via Kiosk mode (correct me if I am wrong).


Solution

  • I have found solution and it works in Assigned Access KIOSK same as in edge shortcut.

    You need to run -> regedit

    \HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\AssignedAccessConfiguration\Profiles{"YourKioskProfile"}\AllowedApps\App0

    and there you can find REG_SZ registry "Arguments" with all parameters.

    You need to add there --kiosk-printing parameter and it will work.