Syntax:
regRedirect -X -T:<target root key>\<mounted Hive> -S:<path to DLL/OCX> -D:<DLL/OCX> [-D:<DLL/OCX> [..]])
To test I wrote a q&d VB program containing a rich text box (richtx32.ocx).
The test brought the result that a lot of other work has to be done before the OLE support in the PE was complete:
- some additional files
- preregister a couple of files (by regRedirect )
Sample: my OCXTest.Script calls
[codebox][Register-BASE]AddVariables,"%OLESupportScript%","Variables"ExtractFile,"%OLESupportScript%","Folder","regRedirect.exe","%Tools%"CopyOrExpand,"%SourceDir%\I386\COMCAT.dll","%TargetDir%\i386\system32"CopyOrExpand,"%SourceDir%\I386\MSVBVM60.dll","%TargetDir%\i386\system32"CopyOrExpand,"%SourceDir%\I386\MSLS31.dll","%TargetDir%\i386\system32"ShellExecute,Open,"%Tools%\regRedirect.exe","-X -T:HKLM -H:WB-Software #$q-S:%TargetDir%\i386\system32\#$q -D:MSVBVM60.dll -D:OLEAUT32.dll -D:OLEPRO32.dll -D:ASYFILT.dll -D:COMCAT.dll"RegWrite,"HKLM","0x1","WB-Software\Classes\TypeLib\{00020430-0000-0000-C000-000000000046}\2.0",,"OLE Automation"RegWrite,"HKLM","0x1","WB-Software\Classes\TypeLib\{00020430-0000-0000-C000-000000000046}\2.0","PrimaryInteropAssemblyName","stdole, Version=7.0.3300.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"RegWrite,"HKLM","0x2","WB-Software\Classes\TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\win32",,"%SystemRoot%\system32\stdole2.tlb"RegWrite,"HKLM","0x1","WB-Software\Classes\TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\FLAGS",,"0"RegWrite,"HKLM","0x2","WB-Software\Classes\TypeLib\{00020430-0000-0000-C000-000000000046}\2.0\HELPDIR",,"%SystemRoot%\system32"IniWrite,"%OLESupportScript%","Variables","#$pOLEInit#$p",1[/codebox]I stored OLESupport.Script and OCXTest.Script on the nativeEx server.To run it, you also need the latest nativeEx_barebone script.project.If you prefer, you may change this script manually:In script.project add the variable[code]%OLESupportScript%=%Core%\Tools\OLESupport.Script[/code]
Peter