Pages

2014年2月6日 星期四

Windows Embedded 8.1 Industry【Breakout Mode】

什麼是Breakout Mode?
當電腦 or device 開機後只能進到一個固定的應用程式時,IT人員如果要修改系統設定,只要按下某個特定鍵〔ex: 【Windows Logo】 5次〕,即可回到登入畫面,並由管理者登入!
註:開機後針對指定使用者進到一指定的應用程式,是由 Assigned Access 或 APP Launcher 達到。

Example:
Windows 8.1 有一個功能叫做 "受指派的存取權" 〔英文稱Assigned Access〕,用來設定 One User x One Application〔一個使用者帳號只能使用一種APP〕,當管理者要做系統維護時,預設是在鍵盤上輸入【Windows Logo】 5次,即可登出。← 這就是Breakout Mode的作用。

那我可不可以變更Breakout Mode的預設鍵?
可以。下列提供兩種方式:

1. 透過 Registry 修改 BreakoutKeyScanCode
Step1:〔Run〕〔regedit〕
Step2:HKEY_LOCAL_MACHINE\SOFTSOFT\Microsoft\Windows Embedded\KeyboardFilter\ 
變更 BreakoutKeyScancode 的值〔default = 5b〕,下圖以Home Key為例,它的值是47,修改完成後,需重新啟動,使其生效。

2. 透過程式碼呼叫WMI來變更 BreakoutKey Scancode
下列是透過 Windows PowerShell Script 變更Breakout Key為【Home】鍵的範例:Breakout Mode的WMI_Class為WEKF_Settings

〔程式碼開始〕
#---Define variables---
$COMPUTER = "localhost"
$NAMESPACE = "root\standardcimv2\embedded"

#Define the decimal scan code of the Home key
$HomeKeyScanCode = 71

#Get the BreakoutKeyScanCode setting from WEKF_Settings
$BreakoutMode = get-wmiobject -class wekf_settings -namespace $NAMESPACE | where {$_.name -eq "BreakoutKeyScanCode"}

#Set the breakout key to the Home key.
$BreakoutMode.value = $HomeKeyScanCode

#Push the change into the WMI configuration. You must restart your device before this change takes effect.
$BreakoutMode.put()
〔程式碼結尾〕

將以上程式碼存檔為 breakoutmode-homekey.ps1,並以管理者開啟PowerShell,執行後如圖,並『重新啟動』,使其生效。

WEKF_Settings可用來設置:
欲了解更詳細的資訊,請參考:

0 意見:

張貼留言