Some time ago, someone in the support forum was asking if it is possible to distribute COM DLL's, on different machines, and not registering them.
Well infact it is possible, using the MS SxS Manifest approach.
For those who don't know what SxS is, it's an other word for ESCAPING DLL HELL :
More information on how to build RegFreeCOM Manifest files, look here : Simplify App Deployment with ClickOnce and Registration-Free COMWindows XP introduces a new COM activation model called registration-free COM, or Reg-Free COM for short. Simply stated, Reg-Free COM is a registry replacement for COM components. It works by expressing all of the standard component registration information that is typically installed into the system registry in a file that can be stored in the same folder as the application itself.
Download this example.
RegFreeCOM_Au3X_Example.zip 159.3K
2264 downloadsSave it to a machine running at least XP, and don't register any AutoItX3.dll.
Run the "RegFreeCOM_Au3X_Example.exe" and see what happenes.
Copy it to an other machine an try again. You will see that you are liberated from DLL registration as of now.
The SxS technique is using an XML Manifest file to replace the need to use "regsvr32" for registering the COM objects.
For those who remember my example on how to create COM objects, without the need of a DLL.
This is next complimentary technique,l that allow you to create, run and distribute COM objects, by just distributing some files.
This is an other example :
Make sure no Au3X.Dll is installed on that machine. Or run : regsvr32 "C:Program FilesAutoIt3AutoItXAutoItX3.dll" /u
In order to run this -> Compile the code to RegFreeCOM_Au3X_Example.exe
And put it in the same folder as where the Manifest files are located. (Can be a USB stick)
$oAutoIt = ObjCreate("AutoItX3.Control.1") $oAutoIt.Run("notepad.exe") ;Wait for the window "Untitled" to exist and be active $oAutoIt.WinWaitActive ("Untitled") $oAutoIt.Send("{Enter}") $oAutoIt.Send("This is an example of : ") $oAutoIt.Send("{Enter}") sleep(500) $oAutoIt.Send("How to get rid of the need of the registry,") $oAutoIt.Send("{Enter}") sleep(1000) $oAutoIt.Send("in order to run COM object like Au3X.dll") $oAutoIt.Send("{Enter}") sleep(1000) $oAutoIt.Send("{Enter}") $oAutoIt.Send("{Enter}") $oAutoIt.send("Enjoy!")
Enjoy !!
ptrex
Edited by ptrex, 15 March 2012 - 02:59 PM.





