PPCGeeks Forums HTC Arrive HTC HD2 HTC Thunderbolt HTC Touch Pro 2 HTC Evo 4G HTC Evo 3D Samsung Galaxy S II Motorola Droid X Apple iPhone Blackberry
Go Back   PPCGeeks > Windows Mobile > WM HTC Devices > HTC Apache
Register Community Search

Notices


 
 
LinkBack Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 08-30-2007, 09:34 AM
gguruusa's Avatar
Deep Thinker
Offline
Pocket PC: Tin Can
Carrier: Atomic Vibration
Location: Mountain top
 
Join Date: Jan 2007
Posts: 3,252
Reputation: 4726
gguruusa should be added to the payroll for their contributionsgguruusa should be added to the payroll for their contributionsgguruusa should be added to the payroll for their contributionsgguruusa should be added to the payroll for their contributionsgguruusa should be added to the payroll for their contributionsgguruusa should be added to the payroll for their contributionsgguruusa should be added to the payroll for their contributionsgguruusa should be added to the payroll for their contributionsgguruusa should be added to the payroll for their contributionsgguruusa should be added to the payroll for their contributionsgguruusa should be added to the payroll for their contributions
Mentioned: 0 Post(s)
Tagged: 0 Thread(s)
Make OEM for .cab with setup.dll

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.
Attached Files
File Type: zip OEM_Tools.zip (6.4 KB, 20 views) Click for barcode!
__________________
Grammar: The difference between knowing your shit and knowing you're shit.
Reply With Quote
 

  PPCGeeks > Windows Mobile > WM HTC Devices > HTC Apache


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -4. The time now is 03:12 PM.


Powered by vBulletin® ©2000 - 2025, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.6.0
©2012 - PPCGeeks.com