開發 Windows 8 Modern App 時,未經 Windows Store 認證的應用程式無法直接執行,必須在本機安裝「開發人員授權」。授權免費、無數量限制、有期限(到期後未認證 App 無法執行,但桌面程式與旁載 App 不受影響)。本文詳細說明三種取得管道、PowerShell 管理指令、授權條款查閱與安全風險。
以系統管理員身分執行 PowerShell:
| 指令 | 功能 | 權限需求 |
|---|---|---|
Show-WindowsDeveloperLicenseRegistration | 開啟圖形化對話框註冊/安裝授權 | 系統管理員 |
Get-WindowsDeveloperLicense | 查詢目前授權狀態(到期時間、是否有效) | 一般/系統管理員皆可 |
Unregister-WindowsDeveloperLicense | 移除本機授權(警告:未認證 App 將無法執行) | 系統管理員 |
回傳物件屬性: ExpirationTime (DateTime), IsValid (Boolean)
C:\> Show-WindowsDeveloperLicenseRegistration
C:\> Get-WindowsDeveloperLicense
C:\> Unregister-WindowsDeveloperLicense
系統安裝授權條款於:
C:\Windows\System32\en-US\Licenses\_Default\<版本對應資料夾>\license.rtf
成功安裝授權後,即可選擇程式語言(C#/VB/C++/JS + HTML5)開始建立第一個 Win8 Modern App 專案。