clearguy Posted August 4, 2006 Share Posted August 4, 2006 Hi, I use a script that needs to put the IE security level to high and deactivate the images. I do it manually,but i's boring all the time,so I ask you how to make a script to do this? Or just say where in the register are stocked these information,thanx. I've never met anyone who codes binary. StringMultiInsert()SOW EncryptFrench autoit forum - forum français Link to comment Share on other sites More sharing options...
Jasio Posted August 4, 2006 Share Posted August 4, 2006 Check the UDFs for IE UDFs those work well. Link to comment Share on other sites More sharing options...
ParoXsitiC Posted August 5, 2006 Share Posted August 5, 2006 (edited) You could make a script that runs Run('control inetcpl.cpl')oÝ÷ ٩ݶ§ë-vºw!¡ð¨ÚèÉbrK0)^¶°whÂ+!×^% 1¯*.r¥vëÂ)âë_ºw-춶Ø^¢b¢{¢¼¨¸Z%-륨¶^¨ºêå I have not tested this and I am pretty new to DllCall. I *think* that setting things to 0 would simulate a NULL call. Edited August 5, 2006 by ParoXsitiC Link to comment Share on other sites More sharing options...
clearguy Posted August 5, 2006 Author Share Posted August 5, 2006 Thanx I'll try with inetcpl.cpl. That with DllCall does'nt work,and it's a little hard to understand for me. I've never met anyone who codes binary. StringMultiInsert()SOW EncryptFrench autoit forum - forum français Link to comment Share on other sites More sharing options...
ParoXsitiC Posted August 5, 2006 Share Posted August 5, 2006 (edited) Using http://support.microsoft.com/kb/182569/$LocalIntranet = 1 $TrustedSites = 2 $Internet = 3 $RestrictedSites = 4 $Low = 0x00010000 $MediumLow = 0x00010500 $Medium = 0x00011000 $High = 0x00012000 $ZonesKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\" RegWrite($ZonesKey & $LocalIntranet, "CurrentLevel", "REG_DWORD", $High) RegWrite($ZonesKey & $TrustedSites, "CurrentLevel", "REG_DWORD", $High) RegWrite($ZonesKey & $Internet, "CurrentLevel", "REG_DWORD", $High) RegWrite($ZonesKey & $RestrictedSites, "CurrentLevel", "REG_DWORD", $High) ;Don't Show Pictures RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Display Inline Images", "REG_SZ", "no") ;Show Pictures ;RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Display Inline Images", "REG_SZ", "yes") DllCall('WININET.DLL', 'long', 'InternetSetOption', 'int', 0, 'long', 39, 'str', 0, 'long', 0)This will set all zones to high security and it wont display pictures. Calling the DllCall will update the all instances of IE to those settings. Without it you won't see a change until you restart IE. Edited August 5, 2006 by ParoXsitiC Link to comment Share on other sites More sharing options...
DaleHohm Posted August 5, 2006 Share Posted August 5, 2006 This is good stuff.Did you try passing an HWND into the DllCall to get it to activate for a single IE instance as well?I'd love to see you break this down into unigue examples for images and security level and enter them into the snippets databaseDale Free Internet Tools: DebugBar, AutoIt IE Builder, HTTP UDF, MODIV2, IE Developer Toolbar, IEDocMon, Fiddler, HTML Validator, WGet, curl MSDN docs: InternetExplorer Object, Document Object, Overviews and Tutorials, DHTML Objects, DHTML Events, WinHttpRequest, XmlHttpRequest, Cross-Frame Scripting, Office object model Automate input type=file (Related) Alternative to _IECreateEmbedded? better: _IECreatePseudoEmbedded Better Better? IE.au3 issues with Vista - Workarounds SciTe Debug mode - it's magic: #AutoIt3Wrapper_run_debug_mode=Y Doesn't work needs to be ripped out of the troubleshooting lexicon. It means that what you tried did not produce the results you expected. It begs the questions 1) what did you try?, 2) what did you expect? and 3) what happened instead? Reproducer: a small (the smallest?) piece of stand-alone code that demonstrates your trouble Link to comment Share on other sites More sharing options...
clearguy Posted August 6, 2006 Author Share Posted August 6, 2006 Thanx alot you really help me! you are the man!! I've never met anyone who codes binary. StringMultiInsert()SOW EncryptFrench autoit forum - forum français Link to comment Share on other sites More sharing options...
ParoXsitiC Posted August 6, 2006 Share Posted August 6, 2006 Dale, You cannot use a hwnd in the InternetSetOption function because this function relies on handles from wininet functions such as InternetOpen, InternetConnect.It is true that Internet Explorer does use the wininet but each instance of an IE thread can run off the same wininet InternetOpen handle. Therefore you can only update all at once. I wish there was a way to only update a IE thread but to my knowledge you can not. However users could be able to call certain internet options if they used the InetGet functions and such.http://msdn.microsoft.com/library/default....net_options.asp Link to comment Share on other sites More sharing options...
Jeremiah Posted November 18, 2010 Share Posted November 18, 2010 What If I simply want to reset the security for all zones to default? Using http://support.microsoft.com/kb/182569/ $LocalIntranet = 1 $TrustedSites = 2 $Internet = 3 $RestrictedSites = 4 $Low = 0x00010000 $MediumLow = 0x00010500 $Medium = 0x00011000 $High = 0x00012000 $ZonesKey = "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\" RegWrite($ZonesKey & $LocalIntranet, "CurrentLevel", "REG_DWORD", $High) RegWrite($ZonesKey & $TrustedSites, "CurrentLevel", "REG_DWORD", $High) RegWrite($ZonesKey & $Internet, "CurrentLevel", "REG_DWORD", $High) RegWrite($ZonesKey & $RestrictedSites, "CurrentLevel", "REG_DWORD", $High) ;Don't Show Pictures RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Display Inline Images", "REG_SZ", "no") ;Show Pictures ;RegWrite("HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main", "Display Inline Images", "REG_SZ", "yes") DllCall('WININET.DLL', 'long', 'InternetSetOption', 'int', 0, 'long', 39, 'str', 0, 'long', 0) This will set all zones to high security and it wont display pictures. Calling the DllCall will update the all instances of IE to those settings. Without it you won't see a change until you restart IE. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now