[Windows Mobile Software Development] tjlabais:
mortscript

I don't know if you have found the solution for this because I didn't have the time to read thru the whole thread, but the xda atom (wm6 releases) community uses the mortscript to install their cabs after a flash. it's built-in into the rom. it searches for all cab in the \storage card\cabs which means you don't have to key in all cabs you want to install PLUS it gives you the choice to install or not each cab.

here's a sample script:

ErrorLevel off

RunWait("\Windows\SetupWizard.exe")
Delete("\Windows\Startup\AutoInstall.lnk")

If(Question("Activate PhonePad?", "AutoInstall", "YesNo")=Yes)
RegWriteString("HKCR","CLSID\{51A2CB38-154E-4C92-A625-A83871C99EC2}","","Phone Pad")
RegWriteString("HKCR","CLSID\{51A2CB38-154E-4C92-A625-A83871C99EC2}\DefaultIcon","","\\Windows\\IntelliPad.dll,0")
RegWriteString("HKCR","CLSID\{51A2CB38-154E-4C92-A625-A83871C99EC2}\InProcServer32","","\\Windows\\IntelliPad.dll")
RegWriteString("HKCR","CLSID\{51A2CB38-154E-4C92-A625-A83871C99EC2}\IsSIPInputMethod","","1")
RegWriteDWord("HKCR","SOFTWARE\HTC\IntelliPad","Languages",0)
RegWriteDWord("HKCR","SOFTWARE\HTC\IntelliPad","PopupMenu",1)
RegWriteDWord("HKCR","SOFTWARE\HTC\IntelliPad","DockList",0)
RegWriteDWord("HKCR","SOFTWARE\HTC\IntelliPad","OneSymbol",1)
RegWriteDWord("HKCR","SOFTWARE\HTC\IntelliPad","AddSpace",0)
RegWriteDWord("HKCR","SOFTWARE\HTC\IntelliPad","PlaySound",0)
RegWriteString("HKCR","SOFTWARE\HTC\IntelliPad","HelpFile","IntelliPad-1.0-(English).htm")
RegWriteString("HKCR","SOFTWARE\HTC\IntelliPad","ResourceFile","IntelliPadRCEnglish.dll")
RegWriteDWord("HKCR","SOFTWARE\HTC\IntelliPad","LibraryCount",10)
RegWriteDWord("HKCR","SOFTWARE\HTC\IntelliPad","Library6",7)
RegWriteDWord("HKCR","SOFTWARE\HTC\IntelliPad","Library7",9)
RegWriteDWord("HKCR","SOFTWARE\HTC\IntelliPad","Library8",11)
RegWriteDWord("HKCR","SOFTWARE\HTC\IntelliPad","Library9",15)
EndIf

Move("\Windows\Start Menu\Programs\Pocket MSN.lnk","\Windows\Start Menu\Programs\Internet\Pocket MSN.lnk")

ForEach x in files { "\Storage Card\Cabs\*.cab" }
If(Question("Install: " & x & "?", "AutoInstall", "YesNo")=Yes)
Run(x)
EndIf
EndForEach

If(Question("(c) MortScript 4.0^NL^introduced by serialzs^NL^^NL^Installation Complete.^NL^Do you want to reset?", "AutoInstall", "YesNo")="No")
Exit
EndIf
Reset

Q: So, how was this script launched?

A: you placed an autoinstall.lnk to the script in the \windows\startup folder by initflashfiles.dat. this lnk file points to your script in the \storage card. which means you can edit the script each time to suit your taste.

You can also see the flexibility of having the features inside the ROM activated or not by altering the registry settings directly. The sample above has the option to activate the phonepad.

Also, there is no more need to edit the cab one-by-one to install to the desired location. copying/moving any file/dir is easier.

To include mortscript into the ROM, you just need the following registry:

[HKEY_CLASSES_ROOT\.mscr]
@="MortScript"

[HKEY_CLASSES_ROOT\.mortrun]
@="MortScript"

[HKEY_CLASSES_ROOT\MortScript]
@="MortScript"

[HKEY_CLASSES_ROOT\MortScript\DefaultIcon]
@="\\Windows\\MortScript.exe,-130"

[HKEY_CLASSES_ROOT\MortScript\Shell\Open\Command]
@="\"\\Windows\\MortScript.exe\" \"%1\""

[HKEY_CURRENT_USER\Software\Mort\MortScript\Processes]

version 4.0 mortscript.exe is only 51.5kb, and it does it's job. At first, we had to use Autorun to launch mortscript since we didn't know how to put in the right registry settings for it to be embedded in the ROM. The last line in the registry was crucial, without it, the executable wouldn't launch. Eventually, Autorun was replaced by this.

You can do a lot of things actually with mortscript, and there is an entire thread dedicated to it. thanks to Mort: http://xdaforums.com/showthread.php?t=289197