Base:我有一小段注册表更改 vb 脚本。
key = "Software\Microsoft\Windows\CurrentVersion\Explorer\Streams"
result = wmireg.CreateKey(HKCU, key)
binaer = Array(8,0,0,0,6,0,0,0,0,0,0,0,229,37,241,101,225,123,16,72,186,157,210,113,200,67,44,227,4,0,0,0,3,0,0,0,67,0,0,0)
result = wmireg.SetBinaryValue(HKCU, key,"Settings",binaer)
key ="Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults"
result = wmireg.CreateKey(HKCU, key)
binaer = Array(28,0,0,0,5,0,0,0,0,0,3,0,0,0,144,0,0,0,0,0,1,0,0,0,255,255,255,255,240,240,240,240,20,0,3,0,144,0,0,0,0,0,0,0,48,0,0,0,253,223,223,253,15,0,4,0,32,0,16,0,40,0,60,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,42,1,96,0,120,0,120,0,0,0,0,0,1,0,0,0,2,0,0,0,3,0,0,0,255,255,255,255,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0)
result = wmireg.SetBinaryValue(HKCU,key,"{F3364BA0-65B9-11CE-A9BA-00AA004AE837}", binaer)
问题:在此代码段中,资源管理器的默认视图将设置为平铺视图。在Windows XP中一切正常。现在我要把它翻译成Windows 8,但没有成功。
如果我使用 UI 手动执行此步骤,我使用Process Monitor来确定将设置的注册表项值。
在 Windows 8 中,密钥:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Settings
将设置为:
08 00 00 00 06 00 00 00 01 00 00 00 E5 25 F1 65
关键是:
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Streams\Defaults\{5C4F28B5-F869-4E84-8E60-F11DB97C5CC7}
将设置为
1C 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
在 Windows XP 中,我可以通过脚本更改此值,重新启动(或注销登录),默认视图是磁贴视图。但在 Windows 8 中没有任何反应。
我用 Windows 8 的值更改了 vbs,现在如果脚本完成,注册表中的值将被成功修改。但是,如果我打开我的资源管理器,则不会应用其他视图。