开发者

VB script + OPEN file.html and perform "allow blocked content" auto

When I open the开发者_高级运维 file.html by MyShell = CreateObject("WScript.Shell"), I also need to enable the "allow blocked content".

Is it possible to do the "allow blocked content" by VB script after VB opened the html page?


Nope, that's not possible for security reasons IE considers, that is something there with the browser (IE), you can not enable it programmatically.


set objShell = CreateObject("WScript.Shell") 

objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Enable Browser Extensions","yes", "REG_SZ" 
objShell.RegWrite "HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_LOCALMACHINE_LOCKDOWN\iexplore.exe","00000000", "REG_DWORD" 

Run the above VBScript. Hope this helps.


That permission request pop up then load offline .html's in IE. Better use HTAs in this case. They have the permission, so not necessary any special setup.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜