jugador Posted December 13, 2023 Author Share Posted December 13, 2023 (edited) @TheXman I lack knowledge using this #AutoIt3Wrapper as I never use them in coading. You use .... #AutoIt3Wrapper_Run_After=C:\Projects\Personal\AutoIt\SxS_RegisterFree_COM_Manifest_Tool\SxS_RegisterFree_COM_Manifest_Tool -exe "%out%" -include "<full path to Chilkat_Manifest_9.5.0_Free_Classes.xml>" I search my computer for "SxS_RegisterFree_COM_Manifest_Tool" but find nothing. so how it work ? I try to add resource #AutoIt3Wrapper_Res_File_Add=....\ChilkatAx-9.5.0-x64.dll.manifest but it not work when I try to get object using ObjCreate getting error: Invalid class string So If I want to try this method on other dll then how i do it? SxS_RegisterFree_COM_Manifest_Tool is needed or is there any other way to Write external manifest. Edited December 13, 2023 by jugador Link to comment Share on other sites More sharing options...
TheXman Posted December 13, 2023 Share Posted December 13, 2023 (edited) 19 hours ago, jugador said: I search my computer for "SxS_RegisterFree_COM_Manifest_Tool" but find nothing. As I mentioned below, I did not include that script/exe. However, I have shown a copy of the log messages from its execution and given a description of what it does. I intentionally included the compiled example script (Chilkat_SxS_Test.exe) because, without my manifest tool, you wouldn't be able to compile the example script with the "run_after" directive. To be clear, even without my manifest tool, I provided everything needed to recreate the compiled exe that uses an sxs manifest (except for a script or tool like ResourceHacker that will let you read & delete the compiled exe's internal manifest). That's why I went into so much detail about what it does. If you have additional questions about my manifest tool and what it does, feel free to ask. On 12/11/2023 at 4:44 PM, TheXman said: The attached zip file contains all of the files and scripts that I will discuss in my example, except for the script that actually creates the manifest and ChilkatAx-9.5.0-x64.dll (which is too big to attach). I will provide details as to what my manifest tool does. 19 hours ago, jugador said: So If I want to try this method on other dll then how i do it? SxS_RegisterFree_COM_Manifest_Tool is needed or is there any other way to Write external manifest. No, my SxS_RegisterFree_COM_Manifest_Tool is not needed. As I said before, it just automates the 4 manual steps I previously described. Again, you can refer to the log file that I posted from my manifest tool to see exactly what it does at a high-level. However, as I also mentioned, you can use ResourceHacker or a similar tool to manually accomplish some of the same tasks. I would strongly suggest using ResourceHacker (or a similar tool) so you can see exactly what is pulled & deleted from the original compiled exe and how it relates to the contents of the sxs manifest. Once you see and understand how to manually create the sxs manifest, it's much easier to automate that process, if you even want or need to automate that process. Which of the steps that I've previously described would you like for me to try and help you gain a better understanding of? The reason I made the sxs example using the Chilkat dll is because you said that you're familiar with. If you would like help with a different Dll, then either post it, provide a link to it, or send it to me in a PM (if it is something you'd rather not post in the public forum). I will take a look at it and see if I can help you understand the steps necessary to create an sxs manifest for it. Edited December 14, 2023 by TheXman jugador 1 CryptoNG UDF: Cryptography API: Next Gen jq UDF: Powerful and Flexible JSON Processor | jqPlayground: An Interactive JSON Processor Xml2Json UDF: Transform XML to JSON | HttpApi UDF: HTTP Server API | Roku Remote: Example Script About Me How To Ask Good Questions On Technical And Scientific Forums (Detailed) | How to Ask Good Technical Questions (Brief) "Any fool can know. The point is to understand." -Albert Einstein "If you think you're a big fish, it's probably because you only swim in small ponds." ~TheXman Link to comment Share on other sites More sharing options...
jugador Posted December 18, 2023 Author Share Posted December 18, 2023 Thanks to @TheXman for emphasize on using ResourceHacker. So I did use ResourceHacker to make AutoItX3.dll worked. 1) write a au3 and convert it to exe using Aut2Exe __Example_A() Func __Example_A() Local Const $o_progid = "AutoItX3.Control" Local $o_Autoit = ObjCreate($o_progid) If Not IsObj($o_Autoit) Then Exit $o_Autoit.ToolTip("This is a tooltip", 450, 200) $o_Autoit.Sleep(2000) EndFunc 2) open the exe using ResourceHacker and modified the manifests portion with this..... <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0"> <file name="AutoItX3.dll"> <typelib tlbid="{F8937E53-D444-4E71-9275-35B64210CC3B}" resourceid="0" version="1.0" helpdir="" flags="HASDISKIMAGE" /> <comClass clsid="{1A671297-FA74-4422-80FA-6C5D8CE4DE04}" threadingModel="Apartment" tlbid="{F8937E53-D444-4E71-9275-35B64210CC3B}" progid="AutoItX3.Control" description="AutoItX3 Class" /> </file> <dependency> <dependentAssembly> <assemblyIdentity type="win32" name="Microsoft.Windows.Common-Controls" version="6.0.0.0" language="*" processorArchitecture="*" publicKeyToken="6595b64144ccf1df"/> </dependentAssembly> </dependency> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v3"> <security> <requestedPrivileges> <requestedExecutionLevel level="asInvoker" uiAccess="false"/> </requestedPrivileges> </security> </trustInfo> <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> <application> <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> <supportedOS Id="{4a2f28e3-53b9-4441-ba9c-d69d4a4a6e38}"/> <supportedOS Id="{1f676c76-80e1-4239-95bb-83d0f6d0da78}"/> <supportedOS Id="{8e0f7a12-bfb3-4fe8-b9a5-48fd50a15a9a}"/> </application> </compatibility> </assembly> that's it you are done make sure you run the modified exe on computer where Autoit is not installed. I will later try to do it without using ResourceHacker TheXman 1 Link to comment Share on other sites More sharing options...
jugador Posted December 18, 2023 Author Share Posted December 18, 2023 (edited) In OP Post I use "Microsoft.Windows.ActCtx" method which is still not working for me. getting Error: Library not registered. It will be great if this "Microsoft.Windows.ActCtx" method also worked. Edited December 18, 2023 by jugador 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