So you want to make an OEM of your favorite program's .cab? And it's not working? Does it have a setup.dll? Maybe this will work for you.
Many programs use a setup.dll in their .cab to load certificates and do other sundry work as part of a programs installation. Since the average person can't pull the certificate or other bit of magic out of the setup.dll, I wrote this little piece of code. It's not very complicated - it just calls the routines in a setup.dll, just like a normal installation does.
Here's what you do:
Use a program like MSCEInf to extract your cab contents.
Put the setup.dll in your OEM project. (rename it to something like OEM_APPinitials_setup.dll)
put the registry entries identified in the .inf in your .rgu file
Put all the files in the appropriate directories (this can be tricky - I suggest starting with placing them exactly where the .cab would, then trying to move them once you have it working)
Put DLL_Invoker2.exe in an OEM folder (you only want one copy of this program in your kitchen - I put mine in my customize OEM folder - maybe Luv2Chill wil lump it into a future kitchen)
DLL_Invoker2 takes these options:
- DLL_Invoker2 setup_dll_name.dll DLL_Entry Install_Dir [FirstRun] [RunOnce]
- setup_dll_name.dll - the name of the .dll the .cab normally uses to install the application
DLL_Entry - one of [INSTALL_INIT | INSTALL_EXIT | INSTALL_INIT_EXIT]
Install_Dir - where the application files are installed (probably /windows, but sometimes you have to use the original install dir)
FirstRun - one of [True | False] flag passed to INIT_EXIT indicating if first call.
RunOnce - [True] If present, will set "HKLM\Software\Apps\GGuruUSA's DLL Invoker\{application_name}" to true, prohibiting DLL_Invoker2 from running again for {application_name}. Delete the key if you want to run it again.
so, make a shortcut something like this shortcut for SPB Plus:
/windows/DLL_Invoker2 OEM_PPlus_setup.dll /windows INSTALL_EXIT True True
add a line in initflashfiles that copies your shortcut to /windows/startup
that's it! with any luck, your app will load on first boot just like it was installed from the .cab.
While most applications can be made into OEMs this way, not everything can be made into a useful OEM. Some apps don't like running from /windows, and some apps have dialogs that pop up during the install. Sometimes you can get these to work, and sometimes getting them to work doesn't gain you much. Some setup.dlls are very poorly written and make lot's of bad assumptions. YMMV.