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.
A line like
Causes that the host's %systemroot%, usually C:\Windows, is written into the PE's registry.If,%pCheckBox10%,Equal,true,RegWrite,"HKLM",0x1,"%HiveKey%\Classes\CLSID\
{5DB2625A-54DF-11D0-B6C4-0800091AA605}\InProcServer32","","%SystemRoot%\System32\icmui.dll"
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:
You can see the files I'm speaking about.
Peter