[Windows Mobile Software Development] FInixNOver:
Hi everyone.

I'm gonna post my experience using RunCC.exe and SDAutorun.exe(for diamond).

I have to say a few things before I start:

I was going to post this on [REF] RunCC & AutoRun & SDAutorun [12-04-2009], but since the thread has been closed I thought this would probably be the best place to post it (if not, please point me in the right direction please).

I have not tried XDA_UC yet

I've tried this:

chk = oem.checkfileexist("\\[B]Internal Storage[/B]\\sdconfig.txt")
if chk == 1 then
runcc.addrun("RunExtra", "run", "\\[B]Internal Storage[/B]\\sdconfig.txt")
end

but got an error when it was going to install a cab, so I decided to combine the use of RunCC and SDAutorun without the need for Mortscript to start SDAutorun (I still use mortscript for other purposes, just not to start SDAutorun). This way I don't need to figure out how much time Mortscript must pause before launching SDAutorun.exe.

I'm using RunCC 1.0.9.1 (although I don't know if it's official or from a leaked ROM since I got it from a WM6.5 Kitchen in Diamond ROM Development section).

I would like to try that RunCC 1.0.9.0 you are talking about here to see whether it works or not, if someone will be kind enough to attach it here.

So, here's what I did:

Following the tutorial in [REF] RunCC & AutoRun & SDAutorun [12-04-2009], I removed CheckAutorun.exe & CheckAutorun.lnk from the ROM OEM folders and the line in the initflashfiles.dat.

I also removed the welcome.lnk from the SYS folders and the line in initflashfiles.dat.

The contents of the key files used in my UC mix:

RunCC.lua

chk = oem.checkfileexist("\\Windows\\Autorun.txt")
if chk == 1 then
runcc.addrun("RunDefault", "run", "\\Windows\\Autorun.txt")
end

Autorun.txt

TSK: \WINDOWS\HTC Black.tsk
EXEC:\Windows\AutoAttribute.exe \Windows\MASD_RemoveReadOnly.txt
EXEC:\Windows\[B]RunCC.mscr[/B]
CAB: \WINDOWS\HTCMMSProviderCAB_20080506.CAB
XML: \WINDOWS\Autorun_Config.xml
FILEOP: \WINDOWS\Menu_Operation.txt
FILEOP: \WINDOWS\File_Operation.txt
EXEC:\WINDOWS\[B]SDAutorun.exe[/B]

RunCC.mscr (adapted to my needs from the original by Noonski)

Used to create some files, delete a reg entry and copy another morscript file to startup folder

Copy( "\Windows\RunCC_default_bg_640_480.jpg", "\windows\AutoRun_default_bg_480_640.bmp" )
Copy( "\Windows\RunCC_default_bg_640_480.jpg", "\windows\AutoRun_default_bg_640_480.jpg" )

RegDelete( "HKLM" , "init" , "Launch58" )[/COLOR] [COLOR=DarkGreen]

Copy( "\Windows\RunX.mscr", SystemPath("Startup") \ "MortAutoConfigFirstrun.mscr" )

RunX.mscr (adapted to my needs from the original by Noonski)

The file copied to the startup folder which will run at 2nd boot and will delete itself after running.

Used to Run Welcome.exe (for screen alignment), deleting some unnecessary files no longer used, etc...

Run("\Windows\Welcome.exe")

Delete( "\Windows\AutoRun_default_bg_480_640.bmp" )[/COLOR] [COLOR=DarkGreen]
Delete( "\Windows\AutoRun_default_bg_640_480.jpg" )

Move( "\Windows\Start Menu\Programs\Google Maps.lnk", "\Windows\Start Menu\Programs\Applications\Google Maps.lnk" )[/COLOR] [COLOR=DarkGreen]

SetFileAttribute(SystemPath("Startup") \ "MortAutoConfigFirstrun.mscr" , "readonly", FALSE)[/COLOR] [COLOR=DarkGreen]
SetFileAttribute(SystemPath("Startup") \ "MortAutoConfigFirstrun.mscr" , "system", FALSE)
Delete(SystemPath("Startup") \ "MortAutoConfigFirstrun.mscr" )

Sleep("20000")[/COLOR] [COLOR=DarkGreen]

Copy( "\Windows\_welcome.png", "\windows\welcomehead.192.png" )

SDConfig.txt

SHOW:\windows\AutoRun_default_bg_480_640.bmp
CAB: \Internal Storage\SDConfig\GoogleMaps-ms-htc_compressed.CAB
CAB: \Internal Storage\SDConfig\WM6_PPC_HTC_Opera9_WWE.CAB

And now some little explanations:

RunCC will be responsible for reseting the device after all customization is finished, so I had to change to this in RunCC package

[HKEY_LOCAL_MACHINE\Software\HTC\RunCC]

"ResetDevice"=dword:1

So, there's no need to include reset command in SDConfig.txt, or even to create a reset file with mortscript.

I hope I made myself clear on what I did (if not, feel free to ask).

Since I have very little spare time these days, this took me a while to complete and as usual in XDA, is still a work in progress. Also due to lack of time I haven't had the time to study this new XDA_UC method.

I don't mean to disrespect any of the work being done here; I just wanted to share my experience, and maybe provide a little more knownledge to this great community.

Also, I'm providing a zip file with my packages used for this method in case someone wants to use them for something.