Murjuk Posted October 16, 2011 Share Posted October 16, 2011 Hello, I can't execute IE related commands on windows pe (livexp, bartpe) _IE functions does not work. For example: _IECreate() #include <IE.au3> $oIE = _IECreate("http://www.google.com", 0, 1) $oForm = _IEFormGetObjByName($oIE, "f") $oQuery = _IEFormElementGetObjByName($oForm, "q") _IEFormElementSetValue($oQuery, "IE.au3 and windows pe") _IEFormSubmit($oForm) Log: --> IE.au3 V2.4-0 Error from function _IECreate (Browser Object Creation Failed) And also this internet connection checker script: $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") If IsNotConnect() Then MsgBox(16, "Error", "Please check your connection to the Internet" & @CR & @CR & $oMyError.description) Exit EndIf Func IsNotConnect() Local $oHTTP=ObjCreate("winhttp.winhttprequest.5.1") $oHTTP.Open("GET","http://www.google.com") $oHTTP.Send() Return @error EndFunc ;Function - Error detecter Func MyErrFunc() Dim $oMyError Select Case $oMyError.source = "WinHttp.WinHttpRequest" SetError(1) Case Else Return $oMyError.description EndSelect Endfunc works on xpe but does not work on live xp. I suspect if it is related with objcreate(), perhaps sth. missing on PE system. Maybe (com/ole issue) Any ideas? Thank you. Link to comment Share on other sites More sharing options...
trancexx Posted October 16, 2011 Share Posted October 16, 2011 Using AutoIt on unsupported systems isn't supported. ♡♡♡ . eMyvnE Link to comment Share on other sites More sharing options...
Mobius Posted October 16, 2011 Share Posted October 16, 2011 (edited) Hello Murjuk, The problem resides your end, and is not really related to AutoIt3 or the _IE functions. For livexp you will need to browse around and find some of its native image building scripts to integrate the necessary internet explorer files. (then hope - pray - fiddle - browse - debug - repeat) Same thing for BartPE except they will come in the form of native plugins similar to livexp in that they configure the building of the environment image to include additional components. As far as I am aware XPE in its default build state already integrates a number of plugins for components such as Internet Explorer support (unless you downloaded these free plugins when you downloaded your edition of xpe). It is worth obtaining the scripts/plugins that cater for the most up to date version of IE possible, since you can be certain that the UDF include will adapt to newer releases of IE. Basically if you use a live / portable edition of any OS (which will be a heavily cleaved edition of its master) with a tool (or a component of the tool) that was written for a fully fleshed edition of an OS, you are going to be experiencing self induced errors until you stick the missing gibs back into the portable image and retest your product. Vlad Edited October 16, 2011 by Mobius Link to comment Share on other sites More sharing options...
Murjuk Posted October 17, 2011 Author Share Posted October 17, 2011 (edited) Yes I know these issues are not related with Autoit. I just wanted to ask if are there any tricks to make them work on PE. For example, iexplore.exe has a different path on XPE. I had a look in IE.au3 and saw a line which shows directly default directory to run ie (I think commands purpose is opening files with ie). Or perhaps some registry entries are missing so autoit can't find the location of iexplore.exe. So I just wanted to ask how does autoit run programs? I guess it uses COM automation but I don't know how it works, and how to fix if it is broken. Or does it have a service dependency? Edited October 17, 2011 by Murjuk Link to comment Share on other sites More sharing options...
Murjuk Posted October 19, 2011 Author Share Posted October 19, 2011 (edited) I found out that these keys were missing in registry, restored them and problem is fixed: expandcollapse popupWindows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\Software\Classes\.dll] @="dllfile" "Content Type"="application/x-msdownload" [HKEY_LOCAL_MACHINE\Software\Classes\.exe] @="exefile" "Content Type"="application/x-msdownload" [HKEY_LOCAL_MACHINE\Software\Classes\Applications\iexplore.exe\shell\open\command] @=hex(2):22,00,25,00,70,00,72,00,6f,00,67,00,72,00,61,00,6d,00,66,00,69,00,6c,\ 00,65,00,73,00,25,00,5c,00,49,00,6e,00,74,00,65,00,72,00,6e,00,65,00,74,00,\ 20,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,5c,00,69,00,65,00,78,\ 00,70,00,6c,00,6f,00,72,00,65,00,2e,00,65,00,78,00,65,00,22,00,20,00,25,00,\ 31,00,00,00 [HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{0002DF01-0000-0000-C000-000000000046}] @="Internet Explorer(Ver 1.0)" [HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{0002DF01-0000-0000-C000-000000000046}\LocalServer32] @=hex(2):22,00,25,00,70,00,72,00,6f,00,67,00,72,00,61,00,6d,00,66,00,69,00,6c,\ 00,65,00,73,00,25,00,5c,00,49,00,6e,00,74,00,65,00,72,00,6e,00,65,00,74,00,\ 20,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,5c,00,69,00,65,00,78,\ 00,70,00,6c,00,6f,00,72,00,65,00,2e,00,65,00,78,00,65,00,22,00,00,00 [HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{0002DF01-0000-0000-C000-000000000046}\ProgID] @="InternetExplorer.Application.1" [HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{0002DF01-0000-0000-C000-000000000046}\Programmable] @="" [HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{0002DF01-0000-0000-C000-000000000046}\TypeLib] @="{EAB22AC0-30C1-11CF-A7EB-0000C05BAE0B}" [HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{0002DF01-0000-0000-C000-000000000046}\VersionIndependentProgID] @="InternetExplorer.Application" [HKEY_LOCAL_MACHINE\Software\Classes\CLSID\{871C5380-42A0-1069-A2EA-08002B30309D}\shell\OpenHomePage\Command] @=hex(2):22,00,25,00,70,00,72,00,6f,00,67,00,72,00,61,00,6d,00,66,00,69,00,6c,\ 00,65,00,73,00,25,00,5c,00,49,00,6e,00,74,00,65,00,72,00,6e,00,65,00,74,00,\ 20,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,5c,00,69,00,65,00,78,\ 00,70,00,6c,00,6f,00,72,00,65,00,2e,00,65,00,78,00,65,00,22,00,00,00 [HKEY_LOCAL_MACHINE\Software\Classes\htmlfile\shell\opennew\command] @=hex(2):22,00,25,00,70,00,72,00,6f,00,67,00,72,00,61,00,6d,00,66,00,69,00,6c,\ 00,65,00,73,00,25,00,5c,00,49,00,6e,00,74,00,65,00,72,00,6e,00,65,00,74,00,\ 20,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,5c,00,69,00,65,00,78,\ 00,70,00,6c,00,6f,00,72,00,65,00,2e,00,65,00,78,00,65,00,22,00,20,00,25,00,\ 31,00,00,00 [HKEY_LOCAL_MACHINE\Software\Classes\InternetExplorer.Application] @="Internet Explorer" [HKEY_LOCAL_MACHINE\Software\Classes\InternetExplorer.Application\CLSID] @="{0002DF01-0000-0000-C000-000000000046}" [HKEY_LOCAL_MACHINE\Software\Classes\InternetExplorer.Application\CurVer] @="InternetExplorer.Application.1" [HKEY_LOCAL_MACHINE\Software\Classes\InternetExplorer.Application.1] @="Internet Explorer (Ver 1.0)" [HKEY_LOCAL_MACHINE\Software\Classes\InternetExplorer.Application.1\CLSID] @="{0002DF01-0000-0000-C000-000000000046}" [HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\IEXPLORE.EXE] @=hex(2):25,00,70,00,72,00,6f,00,67,00,72,00,61,00,6d,00,66,00,69,00,6c,00,65,\ 00,73,00,25,00,5c,00,49,00,6e,00,74,00,65,00,72,00,6e,00,65,00,74,00,20,00,\ 45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,5c,00,69,00,65,00,78,00,70,\ 00,6c,00,6f,00,72,00,65,00,2e,00,65,00,78,00,65,00,00,00 "Path"=hex(2):25,00,70,00,72,00,6f,00,67,00,72,00,61,00,6d,00,66,00,69,00,6c,\ 00,65,00,73,00,25,00,5c,00,49,00,6e,00,74,00,65,00,72,00,6e,00,65,00,74,00,\ 20,00,45,00,78,00,70,00,6c,00,6f,00,72,00,65,00,72,00,3b,00,00,00 Edited October 19, 2011 by Murjuk Link to comment Share on other sites More sharing options...
NDog Posted October 20, 2011 Share Posted October 20, 2011 Good work. Now if you share this useful info with the guys at reboot.pro and msdn I'm sure they would appreciate it. Link to comment Share on other sites More sharing options...
Murjuk Posted October 21, 2011 Author Share Posted October 21, 2011 I think IE.au3 problem only exists on xpe (an old and dead project.). I restored missing registry keys from LiveXP (reboot.pro) ie6 script to xpe. IE.au3 works fine on LiveXP. (so my first post has some wrong information in it.) But winhttp is missing in livexp so I restore the needed registry keys and winhttp.dll for it too and problem is fixed. winhttp registry keys:(for system32\winhttp.dll) expandcollapse popupWindows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{2087c2f4-2cef-4953-a8ab-66779b670495}] @="WinHttpRequest Component version 5.1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{2087c2f4-2cef-4953-a8ab-66779b670495}\InProcServer32] @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,77,00,69,00,\ 6e,00,68,00,74,00,74,00,70,00,2e,00,64,00,6c,00,6c,00,00,00 "ThreadingModel"="Apartment" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{2087c2f4-2cef-4953-a8ab-66779b670495}\ProgID] @="WinHttp.WinHttpRequest.5.1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{2087c2f4-2cef-4953-a8ab-66779b670495}\TypeLib] @="{662901fc-6951-4854-9eb2-d9a2570f2b2e}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\CLSID\{2087c2f4-2cef-4953-a8ab-66779b670495}\Version] @="5.1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WinHttp.WinHttpRequest.5.1] @="WinHttpRequest Component version 5.1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\WinHttp.WinHttpRequest.5.1\CLSID] @="{2087c2f4-2cef-4953-a8ab-66779b670495}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{016FE2EC-B2C8-45F8-B23B-39E53A75396B}] @="IWinHttpRequest" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{016FE2EC-B2C8-45F8-B23B-39E53A75396B}\ProxyStubClsid] @="{00020424-0000-0000-C000-000000000046}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{016FE2EC-B2C8-45F8-B23B-39E53A75396B}\ProxyStubClsid32] @="{00020424-0000-0000-C000-000000000046}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{016FE2EC-B2C8-45F8-B23B-39E53A75396B}\TypeLib] @="{662901FC-6951-4854-9EB2-D9A2570F2B2E}" "Version"="5.1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{F97F4E15-B787-4212-80D1-D380CBBF982E}] @="IWinHttpRequestEvents" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{F97F4E15-B787-4212-80D1-D380CBBF982E}\ProxyStubClsid] @="{00020424-0000-0000-C000-000000000046}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{F97F4E15-B787-4212-80D1-D380CBBF982E}\ProxyStubClsid32] @="{00020424-0000-0000-C000-000000000046}" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Interface\{F97F4E15-B787-4212-80D1-D380CBBF982E}\TypeLib] @="{662901FC-6951-4854-9EB2-D9A2570F2B2E}" "Version"="5.1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{662901fc-6951-4854-9eb2-d9a2570f2b2e}] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{662901fc-6951-4854-9eb2-d9a2570f2b2e}\5.1] @="Microsoft WinHTTP Services, version 5.1" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{662901fc-6951-4854-9eb2-d9a2570f2b2e}\5.1\0] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{662901fc-6951-4854-9eb2-d9a2570f2b2e}\5.1\0\win32] @="%SystemRoot%\\system32\\WINHTTP.dll" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{662901fc-6951-4854-9eb2-d9a2570f2b2e}\5.1\FLAGS] @="0" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\TypeLib\{662901fc-6951-4854-9eb2-d9a2570f2b2e}\5.1\HELPDIR] @=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\ 00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,00,00 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