WARNING. GROUP POLICIES CONTAINS FEATURES THAT CAN LOCK DOWN YOUR COMPUTER. CREATE BACKUPS (INCLUDING WORKING IMAGES) BEFORE START AND FOLLOW ALL STEPS CAREFULLY.
THIS FEATURE WORKS FOR ONLY WINDOWS PRO AND UPPER VERSIONS.
YOU SHOULD BE AN ADMINISTRATOR.
BE SURE SAMBAPOS LOCAL SETTINGS CONFIGURED FINE FOR WINDOWS ACCOUNTS YOU’LL TEST.
Hello. Sorry for writing too much warnings. In this tutorial I’ll show you how to setup your terminals to only run SambaPOS. When a non-administrator windows user logs in SambaPOS will automatically start and automatically logoff when SambaPOS closed. Users will not be able to access anything other than SambaPOS.
First of all we need to prepare a script file that starts SambaPOS and log off automatically when SambaPOS closed. Open Notepad and paste this code into notepad.
strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process") errResult = objWMIService.Create("C:\Program Files (x86)\SambaPOS4\Samba.Presentation.exe", "C:\Program Files (x86)\SambaPOS4\", null, intPosID) Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colProcesses = objWMIService.ExecNotificationQuery _ ("Select * From __InstanceDeletionEvent " _ & "Within 1 Where TargetInstance ISA 'Win32_Process'") Do Until False = True Set objProcess = colProcesses.NextEvent If objProcess.TargetInstance.ProcessID = intPosID Then Exit Do End If Loop Set wshShell = WScript.CreateObject ("WScript.shell") wshShell.run "c:\Windows\System32\shutdown.exe /l", 0, false
If you’ve installed SambaPOS to a different location other than default correct highlighted parts.
Name this file as
SambaStart.vbs and save it under
If you have multiple terminals you can save SambaStart.vbs file under a network location. In this case be sure SambaPOS installed under same local folder (eg. [Program Files]\SambaPOS4) on all terminals.
You can test this script by double clicking on it. Since it will automatically log off be sure you’ve closed all running applications and saved all documents. When double clicked it should start SambaPOS and log off when you close it.
##Accessing GPO Editor Tool
GPO stands for Group Policy Object. To create a new GPO run
Windows + R command or if you are using windows 8 switch to tile desktop by clicking windows button and type mmc.exe. It should start
Microsoft Management Console application.
File Menu click
Group Policy Object Editor, Click
Group Policy Wizard will appear.
THIS STEP IS IMPORTANT
THIS STEP IS IMPORTANT
By default group policy will work for local computer (all users). To change this click
Browse... That will display another dialog. Click
Non-Administrators group from the list.
Non-Administratorsgroup means our setup will only work for non-administrator users.
When you click OK you should see Non-Administrators selected on Wizard dialog.
Finish. button you should see selected snap-in on right side.
OK to Complete Configuration.
Now we can use
GPO Editor tool. To access it later quickly you can click
File > Save As to save a shortcut (.msc file) on Desktop or somewhere else.
Before starting please Double Check you are configuring it for Non-Administrators.
1. Starting SambaStart.vbs when a non administrator user logs in.
User Configuration > Administrative Templates > System.
- Double Click
Custom User Interface.
Custom User Interface setting editor should appear.
- You should see
Custom User Interfaceon top of screen.
wscript c:\Scripts\SambaStart.vbs /nologo /bas interface file name.
If you’ve saved script file to a different location don’t forget to correct file path.
Clicking OK will save configuration.
2. Disabling Task Manager
User Configuration > Administrative Templates > System > Ctrl + Alt + Del Options.
- Double Click
Remove Task Manager
It will display
Remove Task Manager setting Editor.
Enabled option and Click
OK to Save.
Configuring SambaPOS Kiosk mode completed. Now when you login to Windows with a non-administrator user SambaPOS should start automatically and when you close SambaPOS it should log-off. Non administrators should also can’t access any other windows function.
Thanks to @Jesse for mentioning this great windows feature. Since original discussion topic contains some more useful resources I’m linking it here.