本文說明雲端數據存放區設定讀取器工具 readCloudDataSettings.exe,可用來擷取本機裝置上 Windows 雲端數據存放區元件內儲存的數據。 針對 Windows 11 設定的參考 或 Windows 11 和 Windows 10 設定的參考中所記載的設定,如果設定列出類型名稱而非登錄機碼,則必須使用此工具來擷取數據。
用法
單一實例項目
readCloudDataSettings.exe get -type:<type name> [-account:<secondary account id>]
多重實例項目
readCloudDataSettings.exe enum -type:<type name> [-collection:<collection name>] [-account:<secondary account id>]
命令行參數描述
| 參數 | 說明 |
|---|---|
<type name> |
要擷取數據的雲端數據存放區類型名稱(例如“windows.data.platform.diagnostics.diagnosticdata”) |
<collection name> |
雲端數據存放區多重實例類型的集合選擇性名稱。 如果多重實例類型具有具名集合,則必須指定這個值;如果集合沒有名稱或類型為單一實例,則不需要指定。 雲端數據存放區不支援列舉類型之所有集合的數據或名稱。 |
<secondary account id> |
與要擷取數據之目前使用者相關聯的次要帳戶選擇性標識碼(user@domain格式)。 這必須是與目前登入 Windows 使用者相關聯的次要帳戶;它不會為可能共用裝置的其他 Windows 使用者提供數據的存取權。 |
錯誤
如果數據不存在或發生錯誤,輸出將顯示一對空方括弧;例:
[
]
範例
單一實例類型
命令列:
C:\Windows\System32>readCloudDataSettings.exe get -type:windows.data.settings.settingsusagehistory
輸出:
/type: windows.data.settings.settingsusagehistory
[
{"Data":{"pageUsages":{"\"SettingsPageAppsNotifications\"":{"Data":{"frequency":1,"lastUsedTime":1.3353819570909629E+17,"lastUsedSettingId":"SystemSettings_Notifications_QuietHours_MuteNotification_Enabled"}},"\"SettingsPageOtherUsers\"":{"Data":{"frequency":1,"lastUsedTime":1.3353709031552022E+17,"lastUsedSettingId":"SystemSettings.UserAccountsHandlers.RemoveOtherUserSetting"}}}}}
]
單一實例類型、替代帳戶
命令列:
C:\Windows\System32>readCloudDataSettings.exe get -type:windows.data.settings.settingsusagehistory -account:otheruser@contoso.com
輸出:
/type: windows.data.settings.settingsusagehistory
[
{"Data":{"pageUsages":{"\"SettingsPageAppsNotifications\"":{"Data":{"frequency":1,"lastUsedTime":1.3353819570909629E+17,"lastUsedSettingId":"SystemSettings_Notifications_QuietHours_MuteNotification_Enabled"}},"\"SettingsPageOtherUsers\"":{"Data":{"frequency":1,"lastUsedTime":1.3353709031552022E+17,"lastUsedSettingId":"SystemSettings.UserAccountsHandlers.RemoveOtherUserSetting"}}}}}
]
具有集合名稱的多實例類型
命令列:
readclouddatasettings.exe enum -type:windows.data.wifi.wifiprofile -collection:wificloudstore3
輸出:
/type: windows.data.wifi.wifiprofile
/collection: wificloudstore3
[
{"Data":{"profileXml":"<?xml version=\"1.0\"?>\r\n<WLANProfile xmlns=\"http://www.microsoft.com/networking/WLAN/profile/v1\">\r\n\t<name>MySpectrumWiFi98-5G</name>\r\n\t<SSIDConfig>\r\n\t\t<SSID>\r\n\t\t\t<hex>4D79537065637472756D5769466939382D3547</hex>\r\n\t\t\t<name>MySpectrumWiFi98-5G</name>\r\n\t\t</SSID>\r\n\t</SSIDConfig>\r\n\t<connectionType>ESS</connectionType>\r\n\t<connectionMode>auto</connectionMode>\r\n\t<MSM>\r\n\t\t<security>\r\n\t\t\t<authEncryption>\r\n\t\t\t\t<authentication>WPA2PSK</authentication>\r\n\t\t\t\t<encryption>AES</encryption>\r\n\t\t\t\t<useOneX>false</useOneX>\r\n\t\t\t</authEncryption>\r\n\t\t\t<sharedKey>\r\n\t\t\t\t<keyType>passPhrase</keyType>\r\n\t\t\t\t<protected>false</protected>\r\n\t\t\t\t<keyMaterial>ancientzebra274</keyMaterial>\r\n\t\t\t</sharedKey>\r\n\t\t</security>\r\n\t</MSM>\r\n\t<MacRandomization xmlns=\"http://www.microsoft.com/networking/WLAN/profile/v3\">\r\n\t\t<enableRandomization>false</enableRandomization>\r\n\t\t<randomizationSeed>1865639973</randomizationSeed>\r\n\t</MacRandomization>\r\n</WLANProfile>\r\n","lastModifiedTime":1.3354054522984058E+17}},
{"Data":{"profileXml":"<?xml version=\"1.0\"?>\r\n<WLANProfile xmlns=\"http://www.microsoft.com/networking/WLAN/profile/v1\">\r\n\t<name>KIA Service Color</name>\r\n\t<SSIDConfig>\r\n\t\t<SSID>\r\n\t\t\t<hex>4B4941205365727669636520436F6C6F72</hex>\r\n\t\t\t<name>KIA Service Color</name>\r\n\t\t</SSID>\r\n\t</SSIDConfig>\r\n\t<connectionType>ESS</connectionType>\r\n\t<connectionMode>manual</connectionMode>\r\n\t<MSM>\r\n\t\t<security>\r\n\t\t\t<authEncryption>\r\n\t\t\t\t<authentication>WPA2PSK</authentication>\r\n\t\t\t\t<encryption>AES</encryption>\r\n\t\t\t\t<useOneX>false</useOneX>\r\n\t\t\t</authEncryption>\r\n\t\t\t<sharedKey>\r\n\t\t\t\t<keyType>passPhrase</keyType>\r\n\t\t\t\t<protected>false</protected>\r\n\t\t\t\t<keyMaterial>4258270521</keyMaterial>\r\n\t\t\t</sharedKey>\r\n\t\t</security>\r\n\t</MSM>\r\n\t<MacRandomization xmlns=\"http://www.microsoft.com/networking/WLAN/profile/v3\">\r\n\t\t<enableRandomization>false</enableRandomization>\r\n\t\t<randomizationSeed>4088426234</randomizationSeed>\r\n\t</MacRandomization>\r\n</WLANProfile>\r\n","lastModifiedTime":1.3354054522999686E+17}}
]
串行化注意事項
針對互作性設定,數據結構會在從 Windows 匯出時串行化為 JSON。 在某些情況下,這可能會導致不合預期的結果。 請參閱以下範例。
基本資料類型
基本數據類型(整數、浮點數、字串等)沒有超出一般 JSON 編碼的特殊表示法。
結構體系
所有結構(包括最上層結構)都會包裝在名為 「Data」 的 JSON 元素中。 這包括巢狀結構(包括結構用於向量、映射和可為 null 的情況)
範例
此結構定義:
struct MyInnerDataType
{
0: int32 data;
}
struct MyDataType
{
0: MyInnerDataType innerData;
1: int64 id;
}
變成下列 JSON:
{
"Data":
{
"innerData":
{
"Data":
{
"data": 1
}
},
"id": 2
}
}
向量/清單
向量和清單會轉譯成標準 JSON 陣列,如上面提到的警告,結構清單的每個元素都包裹在名為 "Data" 的 JSON 元素中。
範例
此結構定義:
struct MyInnerDataType
{
0: int32 data;
}
struct MyDataType
{
0: vector<MyInnerDataType> dataList;
1: vector<int32> idList;
}
變成下列 JSON:
{
"Data":
{
"dataList":
[
{
"Data":
{
"data": 1
}
},
{
"Data":
{
"data": 2
}
},
],
"idList": [ 1, 2 ]
}
}
塊狀物
Blob 會轉譯成整數數位
範例
此結構定義:
Struct mySetting
{
0: blob settingData;
}
變成下列 JSON:
{
"Data":
{
"settingData":[-103,84,-51,60,-88,-121,16,75,-94,21,96,-120,-120,-35,59,85,4,0,0,0,0,1,0,0,36,0,0,0,73,0,110,0,116,0,101,0,114,0,110,0,101,0,116,0,32,0,69,0,120,0,112,0,108,0,111,0,114,0,101,0,114,0,0,0,1,0,0,0,2,0,0,0,7,0,0,0,7,0,0,0,58,0,0,0,104,0,116,0,116,0,112,0,115,0,58,0,47,0,47,0,103,0,108,0,111,0,98,0,97,0,108,0,46,0,115,0,116,0,115,0,46,0,109,0,115,0,102,0,116,0,46,0,110,0,101,0,116,0,47,0,0,0,2,0,0,0,2,0,0,0,7,0,0,0,7,0,0,0,34,0,0,0,109,0,105,0,99,0,114,0,105,0,100,0,101,0,114,0,64,0,103,0,109,0,101,0,46,0,103,0,98,0,108,0,0,0,3,0,0,0,0,0,0,0,7,0,0,0,7,0,0,0,34,0,0,0,110,0,97,0,109,0,105,0,56,0,48,0,114,0,117,0,108,0,101,0,115,0,58,0,68,0,103,0,109,0,101,0,0,0,1,0,0,0,100,0,0,0,0,0,0,0,8,0,0,0,8,0,0,0,16,0,0,0,-43,-74,60,78,86,37,-40,76,-92,-115,-57,85,-57,55,-53,-90,5,0,0,0,0,0,0,0,8,0,0,0,0,0,0,0,1,0,0,0,7,0,0,0,0,0,0,0,2,0,0,0,7,0,0,0,0,0,0,0,3,0,0,0,7,0,0,0,0,0,0,0,4,0,0,0,6,0,0,0,-58,-104,104,-79,72,-95,103,73,-111,113,100,-41,85,-38,-123,32]
}
}