[HTC Excalibur] dskum:
Embed cab files in ROM

ok - Here you go. The way to embed cab files in ROM and running them after a cold boot automatically. Cabs are cooked in ROM

The following method is applicable in Kavana ROM or any ROM which has the CeleCmd.exe batch processing engine available in ROM. I'll explain for the kitchen in this thread which uses Kavana ROM.

1. Open the 'InitCmd.ccs' available in your 'work\dump' folder in the above kitchen.

2. There is a line "LINK %S\VCSwitch.lnk,CeleCmd.exe,%%W\VCSwitch.ccs"

3. Add the following line next to it "LINK %S\MyCabs.lnk,CeleCmd.exe,%%W\MyCabs.ccs" (without quotes)

4. Add all your required cab files to the 'work\dump' folder

5. Add a file called 'MyCabs.css' to the 'work\dump' folder which has the following text

(My file looks like this)

=============================

MSGX Installing cab files. Please wait...

FILE %S\MyCabs.lnk

EXEC WCELoad.exe, "\Windows\tegicus.cab" /silent /nouninstall

EXEC WCELoad.exe, "\Windows\weather.cab" /silent

REGX HKLM\Software\NRG\ChomeMiniWeatherSettings\Code=CAXX0504

REGX HKLM\Software\NRG\ChomeMiniWeatherSettings\Units=C

==============================

and thats it.. Whenever you cold boot automatically your cabs gets installed.

Now I'll explain what happened:

1. The InitCmd.css runs everytime a phone cold boots

2. We made ourselves a link in start menu using the "LINK" command

3. The link command points to the MyCabs.ccs batch file which has commands to install cabs and make registry entries

4. The batch file does the following:

4A. Gives a message box (MSGX)

4B. Deletes the "MyCabs.lnk" so it runs only one time (FILE)

4C. Executes WCELoad.exe command which installs the cab (EXEC)

4D. Makes the registry entry for my Chome weather panel and gives the location code as Toronto and sets to Centigrade (REGX).

ok some references:

=======================================

Details about WCELoad.exe is available from Microsoft & another site. The cab can be installed without uninstall option and can install silently without any user prompt taking all default values (/nouninstall and /silent (or) /noui)

hxxp://msdn.microsoft.com/en-us/library/bb158700.aspx

hxxp://blog.opennetcf.com/afeinman/PermaLink,guid,1de2284c-a65e-417c-a130-1bd5acd4ad3d.aspx

=======================================

The CeleCmd.exe batch engine is developed by one of chinese buddy, so the documentation is available only in Chinese, but Google did a very good traslation and is available here:

hxxp://translate.google.com/translate?hl=en&sl=zh-CN&u=http://www.yonsm.net/read.php%3F329&ei=b8aTSb6GOpmRmQe-0KiMCg&sa=X&oi=translate&resnum=1&ct=result&prev=/search%3Fq%3D%2522CeleCmd%2B2.0%2B-%2B%25E5%258A%259F%25E8%2583%25BD%25E5%25BC%25BA%25E5%25A4%25A7%25E3%2580%2581%25E7%2581%25B5%25E6%25B4%25BB%25E6%2598%2593%25E7%2594%25A8%25E7%259A%2584%2BWM%2B%25E6%2589%25B9%25E5%25A4%2584%25E7%2590%2586%25E8%25A7%25A3%25E9%2587%258A%25E5%25BC%2595%25E6%2593%258E%2B%2B%25E5%25A4%25A7%2B%257C%2B%25E4%25B8%25AD%2B%257C%2B%25E5%25B0%258F%2B%2B%2B%2522%26hl%3Den%26rls%3Dcom.microsoft:*

======================================

Ok - Now the drawback:

The cab file which is placed in Windows folder is not deletable since its embeded in ROM, so it almost double uses the memory in phone. Say a 1Kb cab file. It uses 1Kb for cab itself and another 1Kb after installation.

If this needs to be avoided then we can use a cab analyzer tool as mentioned in one of the previous post and install all the required files manually and enter the registry entries manually. But from my perspective I prefer direct cab installation, since removing / adding them is easy with above setup and I can cook my own ROM as frequenly as I need, since its just a single file modification and you are done.

Hope this helps!!