Jump to content











Photo
- - - - -

OLE / ActiveX support


  • Please log in to reply
12 replies to this topic

#1 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 29 July 2007 - 11:11 AM

Like Medevil suggested here, I wrote a small Delphi program 'regRedirect' which registers OCXs and DLLs into the mounted software hive.

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 :yahoo: )
Do do that, i wrote a script OLESupport which is called by external scripts to register its OCXs /DLLs.
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

#2 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 29 July 2007 - 12:43 PM

Like Medevil suggested here, I wrote a small Delphi program 'regRedirect' which registers OCXs and DLLs into the mounted software hive.

Syntax:
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:[list]

I'm alittle confused. When exactly is this script to be used?
Just by another script, to move the registering of ocx from boot time to build time.
Or also for capturing the registry entries during install of the program, so that they can be used for building a script?

:yahoo:

#3 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 29 July 2007 - 12:57 PM

Just by another script, to move the registering of ocx from boot time to build time.

Yes

Or also for capturing the registry entries during install of the program, so that they can be used for building a script?

With the current mechanism not possible.

Peter

#4 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 29 July 2007 - 02:27 PM

Yes

With the current mechanism not possible.

Peter

OK.
First place to test it, would be explorer script i guess. ?

:yahoo:

#5 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 29 July 2007 - 02:40 PM

First place to test it, would be explorer script i guess. ?


I do not know what to register in explorer.script.

BTW: Just for test, to add OLE support to the PE:
Run,%OLESupportScript%,Register-BASE
anywhere


Peter

#6 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 29 July 2007 - 04:14 PM

I do not know what to register in explorer.script.

The dlls that get registered in runonceex.

BTW: Just for test, to add OLE support to the PE:

Run,%OLESupportScript%,Register-BASE
anywhere

:yahoo: What do you mean by anywhere? And what is Register-BASE?

#7 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 29 July 2007 - 05:20 PM

:yahoo: What do you mean by anywhere? And what is Register-BASE?

Add that line of code in a script of your choice (maybe explorer)
Register-BASE see my first post.

Peter

#8 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 29 July 2007 - 05:31 PM

The dlls that get registered in runonceex.

DLLInstall is not the same as register an ActiveX DLL / OCX.

DLLInstall is an entry of shlwapi.dll
DllRegisterServer is an entry of the individual DLL / OCX which is going to be registered.
But I will try to add this functionality. Maybe that can decrease the boot time.

The only suited DLL is shimgvw.dll. I'll try it with this one. :yahoo:

Peter

EDIT: Sorry, I was wrong. DllInstall also seems to be an entry of the individual DLL.
Let's see!

Edited by psc, 29 July 2007 - 05:59 PM.
Correction


#9 MedEvil

MedEvil

    Platinum Member

  • .script developer
  • 7771 posts

Posted 29 July 2007 - 08:04 PM

I didn't really check, what gets installed, i just assumed that there must be a reason for this to happen at boot - and not at build time.
And the only reason i know of, would be the problem, that you just fixed. :yahoo:

Drop me a line if my assumption is wrong.

:)

#10 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 29 July 2007 - 09:16 PM

I didn't really check, what gets installed, i just assumed that there must be a reason for this to happen at boot - and not at build time.
And the only reason i know of, would be the problem, that you just fixed. :yahoo:
Drop me a line if my assumption is wrong.

Currently I cannot say whether your assumption is correct or wrong.
Give me some time.

Peter :)

#11 Nuno Brito

Nuno Brito

    Platinum Member

  • Team Reboot
  • 10424 posts
  • Location:boot.wim
  • Interests:I'm just a quiet simple person with a very quiet simple life living one day at a time..
  •  
    European Union

Posted 29 July 2007 - 11:17 PM

Peter, do you mean that now I can simply indicate the location of the ocx file and it will add all the needed registry keys on the target windows?? :yahoo: :) :) :)


These are great news! :)


One suggestion:

IniWrite,"%ProjectDir%\script.project","Variables","#$pOLEInit#$p",1


Will add another variable inside the script.project were already getting this section filled with too many variables - could this value be placed inside a small text file found on the %target_win% folder (%targetDir%\I386 under XP PE and %targetDir%\Windows under VistaPE/Installed Windows)

Or even quickier to create an empty text file ("support_activex"?) inside the same %target_win% and simply check if this file exists or not - this is as fast as checking the value from the variables list (which would also leave traces that would need to be manually deleted whenever we restarted the project from scratch and this value was still marked as active)

The less active variables the better - and this also allows to add the ocx register function inside the api and it would run the Register-BASE section if the above mentioned text file was not found.

Inside API.script could also be placed the location of OLESupport.Script which would also allow to define some other scripting to ensure how to react if this file was not present.


Checked it and noticed some minor details that could be edited on the [main] section

[main]
Title=OleSupport
Description=Copies some necessary files for OLE and registers them
Selected=none
Level=10
Version=001
Date=2007-JUL-29
Author=Peter Schlang
Credit=Boot Land Community.
Upload=2007-Jul-29 12:48:06
Download_Level=0
Contact=http://www.boot-land.net/forums/OLE-ActiveX-support-t2745.html


Modified the Selected=False to Selected=none (older wb versions default to false if this value is not supported) and will take away the checkbox.

Also added the link to this topic, modified the download level to minimum and removed the "Locked=False"

:)

#12 pscEx

pscEx

    Platinum Member

  • Team Reboot
  • 12686 posts
  • Location:Korschenbroich, Germany
  • Interests:What somebody else cannot do.
  •  
    European Union

Posted 30 July 2007 - 02:12 PM

Will add another variable inside the script.project were already getting this section filled with too many variables - could this value be placed inside a small text file found on the %target_win% folder (%targetDir%\I386 under XP PE and %targetDir%\Windows under VistaPE/Installed Windows)

Modified the Selected=False to Selected=none (older wb versions default to false if this value is not supported) and will take away the checkbox.

Also added the link to this topic, modified the download level to minimum and removed the "Locked=False"


I moved the variable from script.project to inside OLESupport.Script.

I installed yout new [Main] section and upload to nativeEx server.
That needs a new Fundamentals script, too.

Peter

#13 deltarocked

deltarocked
  • Members
  • 3 posts
  •  
    India

Posted 27 September 2013 - 09:31 AM

Hi ,

 

I have been trying to deploy MDAC and Jet DB drivers on Live XP. Being a newbie, I am at my wits end from where to begin.

 

Tried searching the forums but couldnt find anything.

 

Error while executing VB Script "800A01AD", the error is on Line No 2.
 

Const adSchemaTables = 20
Set objConnection = CreateObject("ADODB.Connection")
Set objRecordSet = CreateObject("ADODB.Recordset")

objConnection.Open _
    "Provider = Microsoft.Jet.OLEDB.4.0; " & _
        "Data Source = 'm.mdb'"

Set objRecordSet = objConnection.OpenSchema(adSchemaTables)

Do Until objRecordset.EOF
    Wscript.Echo "Table name: " & objRecordset.Fields.Item("TABLE_NAME")
    Wscript.Echo "Table type: " & objRecordset.Fields.Item("TABLE_TYPE")
    Wscript.Echo
    objRecordset.MoveNext
Loop

MDAC_TYP.exe and WindowsXP-KB829558-x86-ENU.exe have been downloaded but cant get them installed .

 

Is there any way on how I can add the functionality of MDAC+Jet on LiveXP.  While Making the ISO , OLESupport has been enabled within WinBuilder [083].

 

Any assistance in the right direction highly appreciated.

Thanks in Advance,.

 

DR.
 






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users