View Poll Results: My Preferred Method is

1 Full XDA_UC Method, Full XDA_UC without RunCC or SDAutorun
17 Vote(s)
2 Semi XDA_UC Method, XDA_UC at second boot after RunCC has run at first boot.
7 Vote(s)
3 Method 3 Legacy Out Of The Box
9 Vote(s)

[UC]XDA_UC V2.RC1, Automated & Silent User & Cook, Configuration Service[14/05/10]

5,326 posts
Thanks Meter: 147
By Noonski, Inactive Recognized Developer / Moderator Emeritus on 13th June 2009, 04:57 PM
Post Reply Email Thread

Another (The?) new way to implement User Customization and Cooking.

This Thread is meant for Rom Cooks.
Users should take a look at the User To User Tips, Tricks ideas and issues thread.

What the XDA UC service does, is silently install (or not so silently if needed by User), .cab, .xdas, .xml, .reg, .mscr, copy over user manila files, install files from SDconfig.txt if wanted and then a few extra's for the freaks like copying folders or creating shortcuts from specific registries. This happens either at first or second boot depending on the existence of either RunCC.exe or Autorun.exe in rom.

It's all Mortcsript so it's very easy to get a grasp of it and change the behaviour and or Chip in adjustments/improvements.
But no knowledge of mortscript is needed to implement
It Uses DotFred's Taskmanager to parse and implement the .reg and .xml files. But it can also be used to disable or enable services or register DLL files.

More Information about the XDA Type Files at:

My Shout out for this Two Year Long Evolving Collaborating Endeavour go to:
Bengalih (that has a very similar UC variant called Sashimi and helped with some of the early scripts I was trying to do with mort while cooking, I wish I could have collaborated more with him, it would have saved time re-inventing the wheel), RoryB for bouncing back ideas, supplying new scripts and perfecting older ones, serfer222 For making the script compacter, jmckeejr, Ameet & the whole Digital XDA SPC Cooking Crew, bbobeckyj, CLHatch, Scinor, Mort, Sleuth255, McCune, DotFred, MrVanx, danny_and_2, Cmonex, utak3r, Laurentius26, Radimus, and the Whole Original SPC Crew for accepting my obsessions.
For Knowingly helping me get the information, unknowingly helping me get the information or motivated me in keep going on in my Quest resulting in this.

If I Forgot you, Forgive me.
If you feel that certain information that has been used originated by you give me a holler and I will credit you if this is so.

Before you consider buying me a beer. Please consider Donating to XDA to help out with the maintenance of the forum and get cool stars next to your Nickname showing your appreciation. Then there are always the people that without their apps this wouldn't have been possible at all that you can consider showing some love. Mort, DotFred & Sleuth255 All of whom made Apps Seemingly simple But oh so useful for the whole XDA and PocketPC community.

Download and Info in next Post
The Following 2 Users Say Thank You to Noonski For This Useful Post: [ View ] Gift Noonski Ad-Free
13th June 2009, 05:00 PM |#2  
Noonski's Avatar
OP Inactive Recognized Developer / Moderator Emeritus
Flag Amsterdam
Thanks Meter: 147
Donate to Me
If your cooking and want your own mortscript to also be run at first boot just name it cook.mscr and put it into Windows folder.

Update: From Version 1.2.0 Cook.mscr will be executed at the same moment as the rest of XDA_UC, so this is depended on if RunCC or Autorun is used.
13th June 2009, 05:00 PM |#3  
Noonski's Avatar
OP Inactive Recognized Developer / Moderator Emeritus
Flag Amsterdam
Thanks Meter: 147
Donate to Me
What this version of the XDA UC service does, is silently install and execute (listed in the order the items get installed)
  1. Run the Users customisations of course.
    User side information here...
  2. Run Cook.mscr in Windows folder(For Cooks Only)
  3. More Cook info coming.
  • Add native support for .mscr, .mortrun, .xda, xdai, xdas & .xdaz files
(Where in "\Storage Card\" is read from HKLM\System\StorageManager\Profiles\SDMemory For MultiLanguage Support)

  • The Rom should have the security relaxed in HKLM\Security\Policies\Polices by setting the value 0000101a to a 1.
    So unsigned installations and Mortscript do not give a security error.
  • If you have a different language then English, don't forget to change the path in the initflashfiles.txt/app.dat file (if your using legacy kitchen )
    The rest of the script should dynamcliy get the correct variable for the storage location.
In the end the process it comes down to the device starting after flashing and not needing any reboot while silently installing Cook and User configurations.

On the User end and cook end no SDConfig.txt ort config.txt file is needed.

Attached the OEM Package and a Sample Package for SD.
(Klaxon.Cab, GoogleMaps.xdas, two .reg files, two xml files, my.tsk, and a test mortscript)

The Control factors of the Sample SD Package is that is should install
HKLM\Software\XDA\Test\Reg 1 Parsed=1
HKLM\Software\XDA\Test\Reg 2 Parsed=1

These are the tweaks present in those files.

In addition everything installed will be found under

And the Morscript in the sample SD Card Package should give a message to confirm it was executed "Mort UC From SD Working"

Cab Files and XDAS files should eventually just be in the startMenu Programs.
G-Alarm is there because it needs User interaction and that will pop up when it needs your attention.

At the end of it all you get a message Installations have finished.

When using SDConfig.txt be sure to add a blank line at the end of it.

Please be aware that the XDA_UC script contains a disclaimer, not to post errors with it to the Mortscript forums, and the usual this **** cloud be dangerous to your phones health.

For Standalone version, place XDA_UC folder from "User_Storage Card" on Storage Card.
Then run "\Storage Card\XDA_UC\Install\XDA_UC.exe"
13th June 2009, 05:00 PM |#4  
Noonski's Avatar
OP Inactive Recognized Developer / Moderator Emeritus
Flag Amsterdam
Thanks Meter: 147
Donate to Me
V 1.0.01
  • Changed Sleep to start UC to 50 seconds for full device Boot before UC starts.
  • Changed "XDA UC Service Start" title to "customization" to match the old one.
  • Changed sleep before completion message to ten second in case the last cab needs user input and the Completion message pops up to early.
  • Changed Sleep at while for Theme installation to 2 seconds.
V 1.0.02:
  • Added Copy1 to Copy2 by reading from registry settings
    "\\Storage Card\\Some Folder"="\\My Documents\\Some Folder"
  • Added Disabling Manila from Homescreen then Copying files from "\Storage Card\XDA_UC\manila" to Windows, The checking for existence of wallpaper_TF3D.png or wallpaper_TF3D.jpg and adding that to
    "HomeBackgroundPath"="\\Windows\\wallpaper_TF3 g"
    Import registry files from "\Storage Card\XDA_UC\manila\manila.reg"
    Re-enable Manila on Homescreen and redraw it.
    If not present do nothing.
  • Added RoryB's Complete SDAutorun.exe replacement/SDConfig.txt parser script.
  • Check for existence of Autorun.exe or RunCC.exe to automatic determine which method/bootcount to use.
    There is no longer the need for two separate XDA_UC versions let alone a third.
  • .reg and .xml files will no be sent to renamed taskmanager "FS_TaskMgr.exe"
  • Added checking for cab files in "\Storage Card\XDA_UC\SD\", for those that don't have the luxury of changing the install paths in a cab file to hardcode these to Storage Card. So you get full user input to choose on these cabs.
V 1.0.03:
Add Support For Diamond Internal Storage Need Someone with a Diamond to Test.
V 1.0.04:
Added Support for PimPackup files *.pib & .cer files.
Moved Disclaimer to the beginning and added an option to reset ad the end.

V 1.1.00:
Added extra Runs for Diamond and Samsung Internal Storage.

V 1.1.1B2:
Applied script improvements to reduce code used and make script a bit faster.
Removed Manila folder copy and replaced it with more general Copy2Root function/folder.
Added recognition of "REG: " command in SDConfig.txt parsing.
Added recognition of "CER: " command in SDConfig.txt parsing.
If( FileExists( "\" & SDF & "\Cabs\pim.vol" ))
During SDConfig.txt just before cpy1, cpy2 function.

V 1.1.1B3:
  1. Mayor overhaul by new script from Serfer222
  2. And then I started adding more crap and messing the new clean code up.
  3. XCP1 & XCP2 commands for SDConfig.txt (Folder Copy with SDConfig.txt)
  4. MCAB command for SDConfig.txt (Cabs that you want manual input for during SDConfig.txt)
  5. SCAB command for SDConfig.txt (Cabs that you want installed to SD SemiAutomaticly during SDConfig.txt)
  6. SC1 & SC2 commands for SDConfig.txt (Shortcut creation with SDConfig.txt)
  7. KILL command for SDConfig.txt (Kill a running .exe/process)
  8. EXEC: command for SDConfig.txt (Was already present but i removed the checking if the file is a .exe so anything can be executed and)
  9. Del: Command for SDConfig.txt
  10. .PROVXML now also get parsed in XDA_UC folder
  11. Changed Serfer222's fix to parse mail xml files before PimBackup to "*mail*.*xml" so now if there's a file containing mail anywhere or is a .provxml get's parsed before PimBackUp.
  12. RESET command for SDConfig.txt
  13. WR1: & WR2: commands to write files using SDConfig.txt
  14. Parse File containing "WiFi in it's name" Early like MyHomeWiFi.xml or MyHomeWiFi.provxml
  15. Add a script to run and add XDA_UC to rom's without it.
  16. "Manual" Folder in XDA_UC folder for Full Manual .cab Installs
  17. "Storage Folder in XDA_UC folder for Semi Silent .cab installs to Storage
  18. Early "*wifi*.*xml" parsing from XDA_UC for quick Wifi connecting.
  19. Eauh maybe i forgot some stuff....
Bug Tracker for last Beta.
Wrong code for the WR1: & WR2: commands (Updated Beta Download with Fixed Script)
WR1: command needs a delete or else the next time it is run it will add text to the file instead of write a new one. Working on Fix. Fix Updated in original Download.
Changed XCP1: XCP2: commands into MOV1: & MOV2: to avoid confusion with CPY1: & CPY2: (TNX RoryB good one) Updated in original Beta Download.

Other Updates I'm looking into All Beta:
  1. Changed Manila/Sense Script so it now Checks for manila.reg @ "\Storage Location\XDA_UC\Copy2Root\Windows\manila.reg" and runs the reg from there.
  2. Test everything again
  3. More optimisation of the code suggested by Serfer222
  4. Call for Sashimi & PresetInstaller, so having Making an XDA UC Rom doesn't force users switching their preferred UC Setup.
  5. Add DELT: command
  6. Config.txt for Cooks (May not be included as it is partly redundant)
13th June 2009, 05:00 PM |#5  
RoryB's Avatar
Inactive Recognized Developer
Flag Lexington
Thanks Meter: 771
Donate to Me
SDAutorun replacement without SDAutorun.exe
Information will be added about this in the future.

Some more changes to my method I thought I would share.

Run the items in SDConfig.txt without using SDAutorun. I do not have any tsk to run, but it would work the same. I put copy first since some EXECs like xcopy need to be copied before execution.

# SDConfig without SDAutoRun
; Wait 10 seconds to start to be sure SDCard can be accessed
Sleep( 10000 )
If( FileExists( "\Storage Card\SDConfig.txt" ))
  xcount = ReadLine( "\Storage Card\SDConfig.txt" )
  While( IsEmpty( xcount ) = FALSE )
    If( SubStr( xcount, 1, 5 ) eq "CPY1:" )
        xcopy1 = SubStr( xcount, 6 )
        xcount = ReadLine( "\Storage Card\SDConfig.txt" )
        If( SubStr( xcount, 1, 5 ) eq "CPY2:" )
          xcopy2 = SubStr( xcount, 6 )
          Copy( xcopy1, xcopy2, TRUE )
    ElseIf( SubStr( xcount, 1, 5 ) eq "CAB: " )
        RunWait( "\windows\wceload.exe", "/nodelete /silent " & """" & SubStr( xcount, 6 ) & """" )
        While( ProcExists ( "wceload.exe" ))
          sleep( 3000 )
    Elseif( SubStr( xcount, 1, 5 ) eq "EXEC:" )
        If( SubStr( xcount, -3 ) eq "exe" )
          Run( SubStr( xcount, 6 ))
  ElseIf( SubStr( xcount, 1, 5 ) eq "XML: " )
      RunWait( "\windows\TaskMgr.exe", "/provxml " & SubStr( xcount, 6 ))
      While( ProcExists ( "TaskMgr.exe" ))
        sleep( 3000 )
  ElseIf( SubStr( xcount, 1, 5 ) eq "TSK: " )
      RunWait( "\windows\cusTSK.exe", SubStr( xcount, 6 ))
      While( ProcExists ( "cusTSK.exe" ))
        sleep( 3000 )
    xcount = ReadLine( "\Storage Card\SDConfig.txt" )
I have a mortscript I call user_C.mscr for some customizations that I used EXEC to run, but thought this way people could have multiple scripts.
If( DirExists( "\Storage Card\SDAUTO" ))
 ForEach xscriptfile in Files( "\Storage Card\SDAUTO\*.mscr" )
    CallScript( xscriptfile )
    sleep( 3000 )
Lastly, I have this final folder to hold cab files I want to install with user input. It also has a script to cleanup a few things from the cab install.
If( DirExists( "\Storage Card\SDAUTO\Final Files" ))
 ForEach xcabfile in Files( "\Storage Card\SDAUTO\Final Files\*.cab" )
    Runwait( "\Windows\wceload.exe", "/nodelete " & """" & xcabfile & """" )
    While( ProcExists ( "wceload.exe" ))
       sleep( 3000 )
 ForEach xscriptfile in Files( "\Storage Card\SDAUTO\Final Files\*.mscr" )
    CallScript( xscriptfile )
    sleep( 3000 )
I had to set config.txt to hide the overlay image and not lock the screen to allow seeing the messages and responding to them. Eventually I see this changing to have the first script copied to start up folder by an initflashfile and not even need AutoRun. Currently config.txt starts the mortscript and does nothing else.
13th June 2009, 05:00 PM |#6  
Sleuth255's Avatar
Retired Senior Moderator
Flag Milwaukee
Thanks Meter: 39
Information about the SDAutorun.exe V2 UC can be found here:

Information about SDConfig.txt & .xml user setup can be found here:
13th June 2009, 05:10 PM |#7  
Senior Member
Thanks Meter: 2
install the cabs in a known order, perhaps alphabetically, so that we can name the files in the order to install like so


etc means we can control the install order.

13th June 2009, 11:02 PM |#8  
Noonski's Avatar
OP Inactive Recognized Developer / Moderator Emeritus
Flag Amsterdam
Thanks Meter: 147
Donate to Me
Reason I chose not to use the known "Cabs" folder is not to screw with that configuration.
(XDA_UC is backwards compatible with SDAutorun v2 SDConfig.txt)

Cabs will be automatically be parsed alphabetically that's a default when more cab's are being processed.

At least I think so

It's using MortScripts ForEach File command.

Almost Everything processed will be written to registry under.


And no more hassle with cabs that need user interaction.

You just interact when they come up.

If it's a good idea I could also make it check for a present Welcomehead.png or the Existence of a TF3D folder to copy over personal TF3D files.

Uploaded the OEM and a Sample SD Test Package.
14th June 2009, 05:54 AM |#9  
mbarvian's Avatar
Senior Member
Thanks Meter: 3
is there a way this could be done without removing the RUNCC?
14th June 2009, 01:11 PM |#10  
Noonski's Avatar
OP Inactive Recognized Developer / Moderator Emeritus
Flag Amsterdam
Thanks Meter: 147
Donate to Me
Yes there is.
There's a few different solutions.
I have added your request to the first Posts.

It runs at second boot and skips a few things that RunCC takes care of like installing cabs present in the windows folder.

This way you can keep everything is with RunCC and the welcome.lnk in initflashfiles.dat

Personally I prefer the First method with no reboots at all but it does require some extra meddling in the Rom.
15th June 2009, 06:40 PM |#11  
Senior Member
Thanks Meter: 6

I have some questions...

Originally Posted by Noonski

(This Method is under Review as it seems the latest RunCC accepts config.txt files from SD)

Originally Posted by Noonski

This didn't work in earlier versions i had my hands on.

Which version is this?

RunCC can execute the same commands in config.txt? (EXEC, TSK, XML, CAB...)
Post Reply Subscribe to Thread

autorun, configuration, cooking, customize, diamond, raphael, rhodium, runcc, sdautorun, td2, topaz, user

Guest Quick Reply (no urls or BBcode)
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes