yashsingh1/xdaforums huggingface dataset:
[Windows Mobile Software Development] cruiserrr:
enhancement proposal

Hi ! I am a happy cooker/user of xda_uc and I wanted to propose an enhancement for future releases. I will try to do myself but I am not such a good programmer and I am so slooooooooooooow !!

If you take a look at the post in my signature you will see that my idea is to optimize roms by not reinstalling many of the programs that can live in the sd card or reinstalling them with xda_uc: benefits:

- shorter set-up

- does not require to backup or restore many user data

- does not add duplicate files to windows directory

- keeps the ram available large

Rather than reinstalling them I simply restore icons and some reg keys /data files and that's it. The reg keys and data files part is very easy with xda_uc but reinstalling the icons requires a lot of set-up and it is difficult to make it standard for many users (many programs to do the same things, some commercial somo not).

What I propose to do is a mortscript menu, reading an ini file (placed in sd card). The user can toogle on/off the different icons included in the script and once he confirms the selection, the script can automatically intall shortcuts, icons and regkeys in the folders pre-defined by the cooker. The script could be run as much times as needed and after a hard reset, it could be processed automatically by xda_uc reinstalling all the extra shortcuts.

If you think is an idea worth developing I can back with more details since I have a pretty clear idea of how it should behave since basically I do it whenever I flash a rom.
[Windows Mobile Software Development] makeveral:
Wohooo!

i saved the .reg file in UCS-2 little endian and i can now import it without problems! Will check if it works with XDA_UC (hopefully it will ;))
[Windows Mobile Software Development] Noonski:
The Create shortcut function through the registry opens that door already.

So you don't need to reinstall, but rather just make a shortcut to the app on the storage space.

There used to be a time some cooks would make Clean roms just for this purpose, but then they got married :D.

There's also another project going on called extendir that is pretty close to what i think you mean.
[Windows Mobile Software Development] cruiserrr:
This is the Autoshortcut thing? can you point me to the relevant threads? I have been looking for it but seems everybody knows what is autoshortcut so did not find explanations on how to use it to restore the shortcut to point wherever you want.

I will check the extendir project

thanks
[Windows Mobile Software Development] Noonski:
Write Files from Registry keys

[HKEY_LOCAL_MACHINE\Software\XDA\Write]

"\\Windows\\Start Menu\\Programs\\Office Mobile\\icon.lnk"="31#officeres.192.dll,-7690"

Create Shortcuts from Registry Keys

[HKEY_LOCAL_MACHINE\Software\XDA\AutoShortCut]

"\\Windows\\StartUpDisabled\\PKG.lnk"="\\Windows\\ PKG.exe"

Two fucntions of XDA_UC :D

I took the Autoshortcut function and added a Write file function to for those nasty shortcuts.
[Windows Mobile Software Development] l3v5y:
Any change you can combine those two?

So you can create a shortcut with things like icons?
[Windows Mobile Software Development] Noonski:
They could be be merged together.

Bot because there would be more " in the .reg the formating would become to complicated.

So i chose the Write function to keep it easier for others to create a link with custom icons to an app.

I'll look up a few more formating variations like:

"\\Windows\\Start Menu\\Programs\\Tools\\Total Commander.lnk"="99#\"\\Windows\\cecmd.exe\"?MPI_ProgramIcons.dll,-111"

With the Shortcut create function you can run into the issue where the ,-111 might be as seen a seperator by Mortscript for the parameter.
[Windows Mobile Software Development] l3v5y:
Ah right. As far as I know, you don't need the 99 before the #. If you don't know how long the string is #\\ is fine... :)
[Windows Mobile Software Development] cruiserrr:
Hi again Noonski, I have one question for you all !!! after testing the autoshortcut feature (using reg files), I decided to go one step farther and use your tool to clean the garbage left in windows folder.

What I intend to do is delete all lnk and png files already moved to the start menu folders (custom start menu) and delete all the provxml. I like kinda naked roms with lots of shortcuts to sd, so I may have quite a few png files I want to get rid off. What I did is to include a call to a clean.mscr script in the cook.mscr. Is that correct? I have observed it runs after the flash but before the user gets access to the system, so it can not be aborted easily :)

In the second stage, I intend to check user storage card and install custom icons in the appropiate folders for the most popular commercial apps but mostly to apps build in XDA or similar sites (open gl, freeware, etc).

After preliminar exercises done succesfully but before coming starting this time consuming effort I wanted two know a couple of things:

a) xda_uc runs after all the oem cabs and xml and initialflashes.dat have been processed? is something else run after xda_uc (in the "cooking" stage)

b) can I use the autoshortcut function in the "cooking" stage?

c) do you know how can I refresh the start menu without resetting? like the new icons png or even state icons. I would like to refresh the start menu without resetting but do not know how.

As you see it is not clear to me if it can be used as a cooking tool that can be embeded or a user customization tool.

Thanks in advance
[Windows Mobile Software Development] makeveral:
usually shorcuts, photos etc are part of the ROM (read-only-memory) so they can't be deleted!
[Windows Mobile Software Development] cruiserrr:
yeah ! I am coming to the same point after a few more attempts!!! Therefore windows garbage can not be removed????
[Windows Mobile Software Development] makeveral:
nop :( if you want to remove something you will have to cook a rom without it
[Windows Mobile Software Development] RoryB:
That is one of the nice things about XDA_UC. You can remove the shortcuts from your package and use the registry key method to create the shortcuts in the folders where you want them.
[Windows Mobile Software Development] cruiserrr:
but then (and I stop with this question since this is getting off.topic)... it means that any program installed in the rom is either doubled (cab in the rom + files or windows files + program directory files) or poured directly to windows???? sorry if it is a kinda obvious thing but I really did not expect that from M$ talent. Why a cab does not leave garbage and an OEM does??? it does not make sense to me.

By the way, I wanted to make one suggestion to noonski regarding pim backup: I keep it in SD card so my suggestion is to check if it is there in sd\program files in case is not found in main memory. I think it is a great functionality, since it cuts completely the need for a pc to do a quick reinstall.

On the autoshorcut funcionality, does the script check if the target file exists and in case it does not exists, deletes the key from the registry?
[Windows Mobile Software Development] makeveral:
i'll be short xD. ROM files cannot be deleted mainly because if you make a hardreset all ROM files will be restored and if something was missing it could go wrong.

About the .cab, if you install a .cab at first boot then it will waste 2x space compared to an OEM package because .cab will be flaged as ROM file so it can't be deleted and you will also have the program files (wich can be deleted but it's stupid xD).
[Windows Mobile Software Development] cruiserrr:
But the oem package again is 2x space if it is something like google maps or youtube since at least lots of dll and files live out of the windows folder... That's my point, the optimal for such programs would then be standard cab installation, ,to mm or sd, depending on frequency of use, and keep them out of the rom ??
[Windows Mobile Software Development] makeveral:
yeah but there's no need to copy that files to program files, you should be able to run them from \windows
[Windows Mobile Software Development] Noonski:
Cool, didn't know that, at least you know why i put 99 there ;)

XDA_UC runs after OEM & ProvXML, it then handless the Cabs unless off course the Semi method is used where Legacy Autorun is being used at first boot.

The nature of ROM will prevent you from deleting Files from Windows that are ROM.

Some people use one Zip file that gets extracted to all the subfolders so you have even less files in Windos folder.

And you could even name the .zip into .piz so it's not a recognized extension. Unkown Extensions also seem to lessen the strain on system speed.

Reason that the Autoshortcut comes later on is because you can't get conflicts with Shortcuts that need to be created by .xda .cab and .xml files.

The start menu populates a bit later but there's less change of errors. Also it has to come after adding .xml and .reg so a user can add the registries he/she wants. And .reg and .xml have to come after .cab files so a user can ammend registries that the cab applies to personal settings.

But maybe Autoshortcut can be run twice (one as erly as possible)

I put the Coook.mscr reference for those more into using Mortscript to it's fullest to add their own flavours very early in the Customisation like unzipping files so you can add eventual extra mort commands right into that file, there's no need to make an extra one.

I'm not planning on switching to WM 6.5 yet so i'm not familiar with the start menu refreshing issues that might plague it.
[Windows Mobile Software Development] skelator03:
anyone know how to script my settings for slingbox with this?
[Windows Mobile Software Development] cruiserrr:
Hi, Thanks for your replies. I correct one of my previous post, I see that PIM Backup place in storage card is also launched but must be placed in XDA_UC. It will be easy for anybody to mod to the actual sd folder where PIM Backup es installed.
[Windows Mobile Software Development] cruiserrr:
Hi, after a lot of reading and trials...I ask for some help here:

1) I want to use runcc to run a mortscript. No success so far.

2) I want to leave xda_uc for user customization

How can I do this? I installed xda_uc and touch nothing (I still do not know how to configure the 3 methods).
[Windows Mobile Software Development] Noonski:
1. It's easier taking into account for "Variable Storage Card Name\XDA_UC"

Then "Variable Storage Card Name\Variable Program Files Name\exefilename.exe"

So i stook with the dump everything into one folder method.

But it checks for a cooked in version first in case the cook already takes PimBackup into account.

2. Just having runcc.exe in your rom will force XDA_UC to only install user Cust and skip cabs in rom and run at second boot.

3. You can try the mymortscript.exe mymortscript.mscr method to call the mymortscript.mscr in RunCC.exe LUA script.

I don't have everything here but i believe that cook.mscr is always called for by XDA_UC on the first boot. So you probably won't need to call an extra script.
[Windows Mobile Software Development] cruiserrr:
You mean, place a script calle mymortscript.mscr and a copy of mortscript.exe renamed as mymortscript.exe, and adding a few lines to the lua script as if I was adding a new config file? I have not found anything about runcc syntax... I will try...

The point is I want to create icons with mscr to avoid lnk files in windows folder but preventing the user having access to the ppc in the meanwhile, so runcc does the job here since if the user tries to stop it, it will reboot and start from scratch again. Why? You know, some people say the first impression is what matters...

By the way, I have a suggestion regarding autoshortcuts: they could check if the exe file exists before creating the icon. At least when I tried with a dummy name the icon was created.

Edit: in the meanwhile, following your tip, I found a quick and dirty solution: VIPmscrEXE: I place in windows myfile.mscr and vipmscrexe.exe renamed as myfile.exe, and add myfile.exe to the config_operator, as the second line in the file, even before the tsk,etc. I use RunCC with no prompt for the pin so it runs and resets, when it reboots everything is there, it asks for the pin and set-up the network and then xda_uc popus up, all with only one reset and no user interaction before this reset !!!! Thanks for your tool and your support.

Next step: add the png's to a zip and use this script to decompress, set only.read attributes for the png I use and delete the ones I do not use.
[Windows Mobile Software Development] Noonski:
In the mortscript package found on the official Mortscript site, there's always a file included called autorun.exe.

Rename that autorun.exe to myscript.exe and have it together with myscript.mscr in the same folder as mortscript (unless mortscript file open execution is set correctly in the registry then mortscript does not needto be there, which is already the case with using XDA_UC)

Another easy solution would be to remove

Run("\Windows\Cook.mscr")

From

If (RegRead( "HKLM", "Comm", "BootCount" ) eq 1)
If (FileExists( "\Windows\Cook.mscr" ))
Run("\Windows\Cook.mscr")

&

If (RegRead( "HKLM", "Comm", "BootCount" ) eq 1)
If (FileExists( "\Windows\Cook.mscr" ))
Run("\Windows\Cook.mscr")

Then add the below at the start of the XDAUC.mscr

If (RegRead( "HKLM", "Comm", "BootCount" ) eq 1)
If (FileExists( "\Windows\Cook.mscr" ))
Run("\Windows\Cook.mscr")
Else
EndIf
Else
EndIf

Which i have just done for next versions.

This way you don't need to make that work around and still have the cook.mscr run on the first boot.
[Windows Mobile Software Development] Noonski:
Just a heads up to get it down on paper.

For 1.1 version i have made cook.mscr run at first Boot ASAP.

In Cook.mscr i have added in

ForEach xshortcut, xsourcefile in regValues ( "HKLM", "\Software\XDA\AutoShortCut" )
Delete(SystemPath("Startup") \ "XDA_UC.mscr")
CreateShortcut( xshortcut, xsourcefile, TRUE )
EndForEach

So shortcut creation is done twice. One for the Cook so hopefully the new WM 6.5 startmenu get's populated quickly enough with cooked in apps.

And the second to take into account any extra user shortcut's needed.

Moved enabling back the display time out just before the End message.

ATM i'm at testing the .xml parsing for Diamond and other Storage locations. next up are the Certs.
[Windows Mobile Software Development] Staxxthedan:
Cooking Noob Question

HI there,

I have anoob cooking question. To Run CAbs, can you just create a OEM folder and chuck them inside or how do you go about putting them in kitchen. Do you need altering initflashfiles.dat and *.provxml. files (or of course since its cab installation that is done for you)?
[Windows Mobile Software Development] Noonski:
In the case of using only XDA_UC on the cooking side, removing RunCC or Autorun.

You just chunk the Cab files into an OEM folder and rename either put left over provisioning .xml files into the registry directly through .RGU or by renaming the .xml files to .provxml

But if your using a combo of XDA_UC with RunCC or autorun you would have to ad the cab files to a config.txt file already present.
[Windows Mobile Software Development] Staxxthedan:
By config.text file you mean the one withing the XDA_UC Package ( The 62f0d5f2-f4aa-4d3e-97fa-32bd6a184199.rgu or the initflashfiles.txt):o

I would like to use the full XDA_UC and on the renaming the .xml files you mean the one within the cab and how I do that is Convert the cab to package, rename the .xml to provxml and convert back to cab and then chunk in an OEM folder? Sorry - Just a complete noob :D
[Windows Mobile Software Development] Noonski:
Ussually a decompiled rom will have one or more config.txt files in a few OEM packages.

Config.txt is not related to the iniflashfiles.txt.

Also in the folders you wil/migh find a few .xml files.

So you might find inside for instance operator_config.txt

XML: \Windows\MASD.xml

So you know that MASD.xml would need to be renamed to MASD.provxml

Or if it only contains registry values pur those into a .rgu file in the corect format.

So renaming .xml files is only of importance to those .xml files found inside a config.txt

Sometimes a rom can have multiple config files.

Put they always have the word config in them inside the OEM folders, and they are always placed inside OEM packages that come before any of the PACKAGE_RAPHAEL_ETC.
[Windows Mobile Software Development] Noonski:
Just throw the Version 1.5 package into SYS or OEM.

Remove Checkautorun.lnk, Checkautorun.exe & Autorun.ex, throw in any cab you need cooked in into any of the SYS or OEM folder or make a new Package folder, or for that matter throw it into the XDA_UC package folder.

Pronto.

I remember from some older devices that .xml files weren't used as much as they are in some of the newer devices.
[Windows Mobile Software Development] Staxxthedan:
Will do that when I cook another ROM. Will keep you posted. Thanks.:cool:
[Windows Mobile Software Development] serfer222:
Hi there =)

It looks like this great script doesn't work with localization.

We tried to cook it with wm6.1 21055 (russian locale 419) and wm6.5 21874 (russian locale 419) - it doesn't work.

It works fine with 409 versions of the same builds.

Hope, you will support other languages soon =)
[Windows Mobile Software Development] Noonski:
It reads the localized names of the Storage Card and Start Up folders.. :(

Can you post a few of the above mentioned Paths?
[Windows Mobile Software Development] serfer222:
hm... I see, but it doesnt' work.

names are:

SDCard is named "Карта памяти"

\Карта памяти

Start Up folder is named "Автозагрузка"

\Windows\Автозагрузка\

Attachment: zip archive with regisrty files from russian wm6.5

Maybe this problem is related with unicode?...

I'll do my best to help you =)
[Windows Mobile Software Development] Noonski:
Yes i think you where right, that was also my first thought.

Just wanted to make sure that at it's just the variable names that are different. And they are.

Did a quick search At Miro's Forum, but found nothin particular.

This should be an easy test you can do yourself.

Re-Open the xdauc.mscr & cook.mscr in Notepad.exe and re save them as Unicode.

As long as we are not using XDA_UC in an old WinCe4.2 or PPC2003 this shouldn't be a problem since Mortscript V4.1.
[Windows Mobile Software Development] serfer222:
I will try, but you know, I think the problem is not in your script file, but in Mortscript. You should get values from registry and why do you think these values will depend on format of your script file?

If you have hardcoded unicode names in your script, then yes, script should be saved as unicode file...
[Windows Mobile Software Development] Noonski:
Yes if this doesn't work I will need to add some systempaths by reading them from Reg instead of using Morts default way of getting them.
[Windows Mobile Software Development] serfer222:
I was dancing with big tambourine around this script and...

I found the source of this problem.

=)

It's not XDAUC.mscr - it's ........

it's app.dat with one grrrrrrrrrrrrrr line

Directory("\Windows\StartUp"):-File("XDA_UC.mscr","\Windows\XDAUC.mscr")

You see? =)
[Windows Mobile Software Development] Noonski:
You got me laughing to for my own stupidity not thinking about that hardcoded one.

Sometimes you can't beat the tambourine and any mind altering substances that might be used with it.
[Windows Mobile Software Development] serfer222:
but there are some problems still...

it works only with hardcoded russian startup folder in mscr.

This is version that works for me (attached).

I tested only these features:

cab install

cab install from \SD

import of reg files

restore contacts

maybe there is some problem with dir copy...

I will check this later.
[Windows Mobile Software Development] cruiserrr:
Hi Noonski, I want to share with you my current configuration just in case you get new ideas for your future releases:

I am running XDA_UC together with RUNCC and I am cooking my start menu using a mortscript that runs at 1st boot (just followed your instructions :))

The two main ideas I think are interesting are:

-it looks for a file in xda_uc called operatorlogo.png and if found customizes the default one

-it creates png reg keys both for sd shortcuts, folders, standard links and links with parameters.

-it only creates the icon if the target program exists, otherwise deletes the png icon

-it creates directories if needed

-it assigns default icons if not defined

-it allows you to remove all dat and reg information from the individual packages and leave there only the png to be used. If the packaged is not in the rom the png is not in the rom so the script will not create the icon.

- sd icons are in a zip so maybe they are unziped and deleted if not used.

I am currently working on adding "rank" keys and I plan also to have an INI fle in XDA_UC folder so that the user can add another shortcut definition file with aditional icons (and also planned be able to remove existing ones or replace folders assigned by default). The other thing I want to work on is performance

I post the individual files as they are now. Maybe when I finish I will repost as a package. The file extraicons.mscr will be integrated in the rom.mscr and read mm icons from a txt file and sd icons from another txt file.
[Windows Mobile Software Development] Noonski:
Cruiser your Script has reminded me of two very important things.

1. Get to know how the new Icons work in wM 6.5

2. Make the script by using Subs.

For the rest there are some Pro's and Some Cons to fully implementing it, but i'll get back to you about it.
[Windows Mobile Software Development] serfer222:
I fixed DirCopy from my russian sdcard - this was my fault, I used "Storage Card" path in my reg file.

So - everything works on russian windows with my hardcoded into mscr startup folder and fixed app.dat.

thank you, Noonski!
[Windows Mobile Software Development] Noonski:
And thank you.

I will add a note about the initflashfiles.txt app.dat for future reference.

This was a classic hit yourself on the forehead for me for overlooking it.
[Windows Mobile Software Development] ahmedfikry:
Hello Noonski

Thanks for your great work

I posted my Eten M700 WM6.5 23089 rom with your User Customization here:

http://eten-users.eu/index.php?showtopic=19537&pid=129647&st=0&#entry129647

proper credit was given of course

please note that its avialable on your postes for intrested users

Everything worked well, except that i included my PIMBackup contactes but it didnt restore them...thats the only file type issue i had with this method, but it was very easy & worked great

Thanks a million
[Windows Mobile Software Development] Noonski:
Cool.

I still think it's funny that XDA_UC is picked up more on Non HTC Devices then it is actually here on XDA itself.

I added your Rom to the list.
[Windows Mobile Software Development] serfer222:
you can add one more

Iolite, WM65, Russian, XDA_UC (Official Russian Mega ROM ported to Iolite)

=)
[Windows Mobile Software Development] Noonski:
I already had the 6.1 version up there and now also the 6.5

I think there's probably more somewhere
[Windows Mobile Software Development] ahmedfikry:
Thanks Noonski

here the new link to my rom with the newest build 28004 for Eten M700

http://eten-users.eu/index.php?showtopic=19640
[Windows Mobile Software Development] Noonski:
Co Beans, i'll look into it.

I had already started removing some of the doubles to shorten the script by making Subroutines to call.

Got some explanation and i get the method, i like it better then using Subs indeed.

And so a non programmer learns again.
[Windows Mobile Software Development] jagan2:
Hello, first of all thank you for this wonderful app.

But i dont understand how to do this i mean i have downloaded the attached file now i dont understand what to cook and where to cook can u plz specify in details in what folder i have to cook and what files. Looking forward for ur reply