Jump to content











Photo
- - - - -

RegisterServer


  • Please log in to reply
No replies to this topic

#1 pscEx

pscEx

    Platinum Member

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

Posted 15 November 2007 - 12:54 PM

Some files have to be registered as InProcServer32 in the PE's registry.

One possible way is to do it at boot time by using regsvr32.exe.
That works fine; but the disadvantage is that it is done at every boot. And if there are a lot of entries, boot time will increase remarkably.

Therefore many developers prefer to register at build time.

There are two ways:
  • The explicit one to write every registry entry by a WinBuilder script command
  • The implicit one by using OLESupport script's Register-DLL or Install-DLL resp.
While OLESupport works fine, in the explicit way there sometimes occur errors.

A line like

If,%pCheckBox10%,Equal,true,RegWrite,"HKLM",0x1,"%HiveKey%\Classes\CLSID\
{5DB2625A-54DF-11D0-B6C4-0800091AA605}\InProcServer32","","%SystemRoot%\System32\icmui.dll"

Causes that the host's %systemroot%, usually C:\Windows, is written into the PE's registry. :cheers:
This should be:

If,%pCheckBox10%,Equal,true,RegWrite,"HKLM",0x1,"%HiveKey%\Classes\CLSID\
{5DB2625A-54DF-11D0-B6C4-0800091AA605}\InProcServer32","","#$pSystemRoot#$p\System32\icmui.dll"


But %Systemroot%\System32 is always in the path.
Therefore the ultimate solution is to omit this and just write the file name.

If,%pCheckBox10%,Equal,true,RegWrite,"HKLM",0x1,"%HiveKey%\Classes\CLSID\
{5DB2625A-54DF-11D0-B6C4-0800091AA605}\InProcServer32","","icmui.dll"


I tell this because I saw these issues, when writing a new tool which checks the target and searches files which aren't registered but should be.

I wrote it quick and dirty for my development in nativeEx_moa-lite, and want to complete and publish it now.

A current preview:
scanRegEx.gif

You can see the files I'm speaking about.

Peter




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users