yashsingh1/xdaforums huggingface dataset:
[Touch Pro, Fuze ROM Development] eras2r:
To simply copy files from \Windows to another directory, you can use an initflashfiles.txt in the OEM. Syntax is:

Directory("\Windows\Start Menu\Programs\Tools"):-File("Enable Proxy.lnk","\Windows\Enable Proxy.lnk")

If you are trying to just place Start Menu items in different folders, it's a bit more complicated. There are many places that this can happen.

1) In \OEM\OEM_Lang_0409\initflashfiles.dat

You can edit this file in Notepad if you remove the ReadOnly bit in Windows. Once you've edited it in Notepad and saved it, you need to re-open it in a Hex editor and delete the first 2 bytes "ff fe". Once you delete those first 2 bytes, save the file and reset the ReadOnly flag. In this file is where I define the Folders I want to use in my "Start Menu" folder like this:

; Start Menu contents

Directory("\Windows\Start Menu"):-PermDir("Programs")

Directory("\Windows\Start Menu"):-PermDir("Settings")

Directory("\Windows\Start Menu\Programs"):-Directory("Games")

Directory("\Windows\Start Menu\Programs"):-Directory("Navigation")

Directory("\Windows\Start Menu\Programs"):-Directory("Internet")

Directory("\Windows\Start Menu\Programs"):-Directory("Multimedia")

Directory("\Windows\Start Menu\Programs"):-Directory("Office")

Directory("\Windows\Start Menu\Programs"):-Directory("Phone")

Directory("\Windows\Start Menu\Programs"):-Directory("Tweaks")

Directory("\Windows\Start Menu\Programs"):-Directory("Tools")​

2) *.provxml files

You need to edit these files with a unicode editor. Personally I use EmEditor. You'll notice that in mose packages in \OEM and \SYS there is a _Lang_0409 dir that goes along with it. It's "usually" in this folder where you'll see a *.provxml file. If you open these in EmEditor you'll see that there are lots of file operations. You want to seach or the line containing the *.lnk. In that line you can set the patch of where you'd like the icon installed.

There may be other places that this happens as well, but that's just off the top of my head.

Good Luck!

-e
[Touch Pro, Fuze ROM Development] arvin2212:
Somehow, i am not able to find this file , initflashfiles.dat in my OEM_Lang_0409 folder. :?
[Touch Pro, Fuze ROM Development] eras2r:
Do you have Windows Explorer setup to view all system/hidden files? (Tools->Folder Options-->View)
[Touch Pro, Fuze ROM Development] Da_G:
If using a kitchen that supports it (mine does for sure) you can create a new, blank text file in a package folder, initflashfiles.txt

it uses the same format eras2r posted above, but gets appended to initflashfiles.dat during the cooking process

in this manner you can have initflashfiles.dat changed on a per-package basis, it's also easier because you don't have to worry about the first 2 bytes etc.

e.g. \Packages\beer\initflashfiles.txt

When cooking rom check box next to package "beer"

now the contents of \Packages\beer\initflashfiles.txt get appended to initflashfiles.dat automatically during cooking, don't get applied if box is not checked

similarly this initflashfiles.txt can go in any folder in \OEM and \SYS as well

:)
[Touch Pro, Fuze ROM Development] arvin2212:
eras2r, yes , it has already been configured to show hidden files & folders :)

Da_G, i get what you mean, roughly. What you're saying basically is that i can manually create a txt file for initflashfiles and leave it in the packages folder?

Also i am not sure about the syntax that eras2r posted. I find it alittle well above my level of knowledge. Maybe someone can guide / explain to me regarding this?
[Touch Pro, Fuze ROM Development] Da_G:
Right right, an initflashfiles.txt can go in any subfolder under \OEM \SYS or \Packages

You can create the file with notepad, no need to worry about removing things with a hex editor or otherwise using anything other than notepad.

The syntax is as follows:

using this example to create a directory:

Directory("\Windows\Start Menu\Programs"):-Directory("Tools")

Directory("\Path\to\create\directory\in\goes\here"):-Directory("Name_Of_Directory_To_create_in_path") - essentially you're saying "Switch to the folder named \Path\to\create\directory\in\goes\here and create a new folder named Name_Of_Directory_To_create_in_path inside of it.

similar syntax to copy a file from one directory to another:

Directory("\Windows\Start Menu\Programs\Tools\"):-File("Fieldtest.lnk","\Windows\Fieldtest.lnk")

Directory("\Path\to\copy\file\in\goes\here"):-File("destination_file_name.ext","\source\path\to\filename.ext") - here you're saying "navigate to \Path\to\copy\file\in\goes\here, copy file from source \source\path\to\filename.ext, rename it to destination_file_name.ext when copying (you can use the same filename here if you don't want it renamed, renaming is useful for files that might be indexed by windows media player, or the windows help system, etc.

That should clear it up a bit, let me know if it doesnt :)
[Touch Pro, Fuze ROM Development] arvin2212:
Ah.. That is very helpfull. Thank you very much. I now understand it better. So if i am correct , say i want to create 4 folders : Navigation,Multimedia,Apps,Tools

I enter these values into the initflashfiles.txt.

Directory("\Windows\Start Menu\Programs"):-Directory("Tools")
Directory("\Windows\Start Menu\Programs"):-Directory("Navigation")
Directory("\Windows\Start Menu\Programs"):-Directory("Apps")
Directory("\Windows\Start Menu\Programs"):-Directory("Multimedia")

And after that, to move the files in these folders, I add another set of values in the same initflashfiles.txt right? So for example, once done, my initflashfiles.txt should look like this? :-

Directory("\Windows\Start Menu\Programs"):-Directory("Tools")
Directory("\Windows\Start Menu\Programs"):-Directory("Navigation")
Directory("\Windows\Start Menu\Programs"):-Directory("Apps")
Directory("\Windows\Start Menu\Programs"):-Directory("Multimedia")
Directory("\Windows\Start Menu\Programs\Multimedia\"):-File("Mp3player.lnk","\Windows\Fieldtest.lnk")
Directory("\Windows\Start Menu\Programs\App\"):-File("Fieldtest.lnk","\Windows\Note.lnk")
Directory("\Windows\Start Menu\Programs\Tools\"):-File("Fieldtest.lnk","\Windows\Fileexplorer.lnk")
Directory("\Windows\Start Menu\Programs\Navigation\"):-File("Fieldtest.lnk","\Windows\Gpstest.lnk")

Is that correct?

:)

Edit: I tried adding initflashfiles.txt that contained these values just to try it out,

Directory("\Windows\Start Menu\Programs"):-Directory("Tools")
Directory("\Windows\Start Menu\Programs"):-Directory("Navigation")
Directory("\Windows\Start Menu\Programs"):-Directory("Apps")
Directory("\Windows\Start Menu\Programs"):-Directory("Multimedia")

I added it in the \OEM directory [ \OEM\initflashfiles.txt]

Then i created the ROM and flashed my phone with it. However upon installing everything, i went to the program menu, but everything was still the same.

In case someone might say that, perhaps it flashed the original stock ROM instead of what i made, i don't think so. I removed the jetcet folders , and upon flashing, and after installing , i received an error that it couldn't locate the jetcet cab file. So it was using the ROM that was modified by me. :)
[Touch Pro, Fuze ROM Development] Da_G:
Directory("\Windows\Start Menu\Programs\Multimedia\"):-File("Mp3player.lnk","\Windows\Fieldtest.lnk")

Here in the first link you're copying fieldtest.lnk from \Windows to \Windows\Start Menu\Programs\Multimedia, and renaming it to Mp3player.lnk, i don't think that's what you want to do. the line should read as:

Directory("\Windows\Start Menu\Programs\Multimedia\"):-File("Field Test.lnk","\Windows\Fieldtest.lnk")

assuming you want the link to read "Field Test" in the start menu.

same thing for the other 3 .lnk's you're copying over, you're renaming them all to fieldtest.lnk after copying, rather than the name you want.

Should go in \OEM\Subfolder or \Packages\Subfolder or \SYS\Subfolder

but not right in \OEM :)
[Touch Pro, Fuze ROM Development] arvin2212:
Thanks Da_G . I will try that and post my results soon.

Now, another question, how do i remove original applications that comes with the phone? example, jetcetprint, getting started and so on? What do i have to edit?

I tried to remove the folders for that but upon reflashing, an error would pop up in my phone saying something like unable to install the file as it is missing. So i am sure there is a file that contains some sort of value that instructs the installer to install the app in the phone. :)
[Touch Pro, Fuze ROM Development] Da_G:
Anything that's a cab like jetcet, you have to remove the package as you did, but additionally you need to go through the config*.txt files, and find the one that calls that cab, and remove that line from it, so it doesn't try and install the cab that isn't there anymore. :)
[Touch Pro, Fuze ROM Development] arvin2212:
Da_G, i created the initflashfiles.dat file with the following entry just to test it out. To create a few folders and to move some shortcuts in the folder. Below is the entry:

Directory("\Windows\Start Menu\Programs"):-Directory("Tools")
Directory("\Windows\Start Menu\Programs"):-Directory("Navigation")
Directory("\Windows\Start Menu\Programs"):-Directory("Apps")

;--------------------------------------------------------------------------
Directory("\Windows\Start Menu\Programs"):-Directory("Multimedia")
Directory("\Windows\Start Menu\Programs\Multimedia"):-File("Camera.lnk","\Windows\Camera.lnk")
Directory("\Windows\Start Menu\Programs\Multimedia"):-File("Audio Booster.lnk","\Windows\AudioBooster.lnk")
Directory("\Windows\Start Menu\Programs\Multimedia"):-File("Streaming Media.lnk","\Windows\Streaming Media.lnk")
Directory("\Windows\Start Menu\Programs\Multimedia"):-File("Album.lnk","\Windows\Album.lnk")
Directory("\Windows\Start Menu\Programs\Multimedia"):-File("YouTube.lnk","\Windows\YouTube.lnk")

After that , made a folder in OEM named example and save the initflashfiles.dat there. [\OEM\example\initflashfiles.dat]

Right after that, i tried building the ROM until it reached the BuildOS app. I pressed the green button and it started doing what it suppose to do until it halted for a moment and then an error pop-ed out. It says "Could not find file 'temp\dump\initflashfiles.dat"

What do i do? I tried to add the initflashfiles.dat manually in the folder but the problem still occurs.
[Touch Pro, Fuze ROM Development] Da_G:
More than likely the text editor saved the .dat improperly, i've ran into that issue before. UltraEdit is one editor I know will save it properly, beyond compare also does.

Incidentally this is one reason it's alot easier to use an initflashfiles.txt, you don't have to worry about the file format getting mangled.
[Touch Pro, Fuze ROM Development] arvin2212:
Thanks Da_G.

It works after i saved it as a .txt file.

This leaves me to add apps for the phone.

How do i do that? I tried Personal OEMizer, But when rebuilding the ROM, i get an error saying FILENAME.dll is a directory or something like that.

How else would i go about it? Any recomendations? :)
[Touch Pro, Fuze ROM Development] crazyC:
What apps are you looking to add?

Which settings if you use OEMizer?

I find the easiest way is to search for packages for the app you want.

I have a couple of packages I set up for things like setting the user name, region etc, the fact I like the big keys rather than small keys etc.

I use an xml file as part of the UC process to set up my exchange email.

Sometimes I could not get things to 'take' as part of the initial flash and so built them into the UC process.

For SIMPLE apps, there is a packagecreator tool that is quite good. Doesn't always work for more complex cabs.
[Touch Pro, Fuze ROM Development] arvin2212:
Currently these are the files that i want to install:-

FInixNOverBattery.cab

RRE_MASTER_GRAPHICS_CAB_4.5.cab

RRE 4 Row.cab

VibrateAlert.CAB

Adobe_Flash_3.1.cab

Microsoft .NET CF 3.5.CAB

nodata.cab

Advanced_Configuration_Tool_v3.3.cab

Audio_Full_Boost.cab

Diamond Tweak 0.5.3_English.cab

FdcSoft_TaskMgr_wm2005_3.1.cab

fexploreext.CAB

GPSTest.ppc.CAB

TotalCmndr2.5.cab

Added them in the OEMizer via the "import cab" button.

No other settings are checked except for

OEM Info [GUID Generated (use fffffff in GUID UNCHECKED) + names of all sorts]

Files & Shortcuts (where the cabs are)

Additional Registry Entries (values are added from the cabs, i did not alter anything)

That's all.

Once it's created , i add the folder in my OEM folder and started to build my ROM.

Now when i build the ROM via BuildOS, After awhile , an error pops up saying "FILENAME.dll is a directory,not a folder"

So i am stuck there. When i delete the .dll that name was displayed and rebuild again, the error pops up with a different .dll file. So i know this is not a way to go on deleting files. Any advice?
[Touch Pro, Fuze ROM Development] crazyC:
OK, prebuilt packages for most of those are available if you search - I am at work but will try and upload some later - no promises though as wife keeps me away from my PC

I use packages for (from your list):

Advanced config

Fredsoft Task Manager (this one is easy - I think its just the exe and a shortcut plus the initflashfile)

Total commander

In fact, if you download Eras2rs latest kitchen and look in the packages foler you should find some of them.

Also, search for Ervius' packge creator, rather than Oemizer.
[Touch Pro, Fuze ROM Development] arvin2212:
I see..

I appreciate your help :)

What is the difference between prebuilt packages than the normal cabs?
[Touch Pro, Fuze ROM Development] crazyC:
Packages are what you put in your kitchen which get then get cooked into the ROM.

Cabs you install into memory later and are lost if you Hard Reset.

BUT, you can include cab files within the ROM, just to make things more complicated, and install them as part of the setup process.

What I meant about the prebuilt packages is that a number of Chefs here make available their Kitchens, and you can often (not always) copy the package from there into your kitchen. Or you can try and make one yourself from a cab. How well this works depends on the nature of the program and how complex the install is.

There are pro's and cons to using cabs vs packages. Some things work much better when cooked in, but using a cab avoids duplication of files and allows for an uninstall and upgrade of the program.

Anything you put in a package will end up in the windows folder of your device. the initflashfiles then copies either shortcuts or files into the rest of the structure. If tyou include a cab within your rom, you will end up with the cab taking up space in the rom and then also the installed program.

Hence the beauty of UC. If you don't know what that is go look up the thread on UC by Sleuth255 in the devlopment and hacking section. Saves a lot of time when doing lots of rom flashing.
[Touch Pro, Fuze ROM Development] arvin2212:
A very good explanation crazyC.

So what it is basically is , It's better for me to use packages, place them in the OEM folder, and add the entry of it in the initflashfiles.txt so that it would be added in the right folder?

I read about UC earlier , and if i am not mistaken, apps would be installed automatically , but they must be on your SD card first. If they're not on the SD card, then they wouldn't be installed. Am i right?

edit: 1 more thing :) . Assuming that the app that i want to include isn't available in any packages here, how do i generate my own package? I tried the "package creator" tool but somehow it says " Package created successfull!!! And .reg was imported into .RGU file!! "

Now i went into the folder and i noticed, 1 RGU file, 1 DSM file, 1 initflashfiles.txt file that loooks like

;*****************************************************************************
;initflashes.txt created with packages generator by ervius!!!
;package: MY_APP_NAME_HERE

;Help files:
;end of package: MY_APP_NAME_HERE
;*****************************************************************************

and a .xml file.

Is this correct? I sense something isn't right. :)
[Touch Pro, Fuze ROM Development] arvin2212:
Allright.. I messed around with the package creator tool and somehow i got the hang of it.

But there is still a few issues.

I made a package for this cab file that alters the icon arrangements to 4 rows and i made packages for advance config and a few more apps.

Then i proceeded to build the rom and everything went fine.

Once my phone was flashed, I could see that a few icons were already generated that i created from the initflashfiles.txt . However, there are duplicates of the icons. The icons are inside their assigned folders , yet they're on the program menu as well. How do i overcome this issue?

And 1 more issue reffering to the package. I am sure everything was installed correctly as the program menu and folders displayed 4 rows of icons. However i am unable to find the icons nor the apps that was included in the package anywhere in the phone. I had selected the option of installing it on the build OS menu...
[Touch Pro, Fuze ROM Development] Da_G:
Your option.xml must contain a reference to the GUID that is in the filename of the .dsm in the package folder.

i.e. you have this folder structure:

\Packages\BobsPackage
\Packages\BobsPackage\option.xml
\Packages\BobsPackage\xxxxx-yyyyy-zzzzz.dsm
\Packages\BobsPackage\otherfiles.ext
\Packages\BobsPackage\moreoftherfiles.ext
\Packages\BobsPackage\initflashfiles.txt

whatever the filename of the .dsm is (52dcbada-7234-4ee7-b513-731176d5f860.dsm for example)

must be present inside option.xml on this line:

<Guid type="p">52dcbada-7234-4ee7-b513-731176d5f860</Guid>

(note no .dsm on the end of that)

if the guid is not present and does not match, the package won't be inserted when you check the box.

All files included in a package will be in \windows, the initflashfiles.txt copies them out of there (the way windows mobile works, everything on the rom goes to \windows and gets copied out)

so check \windows for your files, if they aren't there, something's amiss! if they're there and just not in the folder you intended them to be, they didn't copy right in initflashfiles.txt.
[Touch Pro, Fuze ROM Development] arvin2212:
I checked the folder and the xml file and both the option.xml and the .dsm contain the same GUID..

From the option.xml

<?xml version="1.0" encoding="UTF-16" standalone="yes"?>
<Items>
<Item name="MYAPPFILENAMEHERE" group="Apps" checked="False">
<Tip></Tip>
<Guid type="p">9853b684-5cf3-4b75-a59b-049a47d6102a</Guid>
</Item>
</Items>

and the .dsm file name is

9853b684-5cf3-4b75-a59b-049a47d6102a.dsm

There is a same file with the guid,

9853b684-5cf3-4b75-a59b-049a47d6102a.rgu

Also,Da_G , do you have any ideas, like in the previous post that i've posted about the duplicate icons?
[Touch Pro, Fuze ROM Development] Da_G:
Not sure exactly what you mean, the icons are being copied to 2 different places?
[Touch Pro, Fuze ROM Development] Da_G:
Ahh, might the reason for that be that activesync is by default installed to \Programs and you are just making another copy in \Programs\Tools?

Does it happen with any icons that aren't in there by default?

If not, you can use a .provxml to delete the icon from \Programs.
[Touch Pro, Fuze ROM Development] arvin2212:
all of the above icons, they are copied from the main folders to their respected folders, in which i mean, the icons are duplicated instead of moved.

Can you explain the .provxml and how i can utilize it to delete the duplicate icons?
[Touch Pro, Fuze ROM Development] eras2r:
Hint: Look at the provxml file in \SYS\Office it will show you what you are looking for.
[Touch Pro, Fuze ROM Development] Da_G:
Here's one basic example of using a .provxml to delete a file:

<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="\Windows\Start Menu\Programs\firstfile.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
<characteristic type="\Windows\Start Menu\Programs\Secondfile.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>

save it as a simple text file, with a name such as: mxip_mystuff_100.provxml

ensure that the nesting is proper within the xml tags, and the file is marked read only (may need to be +s +h +r attributes, forget exactly)
[Touch Pro, Fuze ROM Development] eras2r:
You can simply save that as an *.xml file in OperatorPkg.

Then edit the config_operator.txt file and add your line to process the xml file:

LOCK:Enabled

XML: \WINDOWS\yourXMLfile.xml

CFG: \Windows\config_end.txt

Then during customization after initial boot, it will process those entries.

A good way to troubleshoot the XML is to process is using SASHIMI.

Copy yer XML file to your SD card

Grab and Install SASHIMI

Launch it and select manual

Select process XML (or whatever it says)

Browse to the XML file and select ok

It will process it

Check your OS and see if the changes were made

OR......

Simply add your entries to the end of the mxipupdate_oemoperators_107.provxml file. You'll have to find that file depending on what kitchen you are using.

Good Luck.

OH and yer missing the <wap-provisioningdoc> statement at the top of your file unless it was a copy/paste issue.
[Touch Pro, Fuze ROM Development] arvin2212:
This helped me alot.. Thank you so much.. There is an issue but still much better than before.

Allright, i installed sashimi on my phone. Copied the .xml file i made into my phone and loaded it. I couldn't see any changes.

What i did next was to create a new .xml and copied what Da_G posted on earlier :-

<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="\Windows\Start Menu\Programs\firstfile.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
<characteristic type="\Windows\Start Menu\Programs\Secondfile.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>

I edited it to become:-

<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="\Windows\Start Menu\Programs\Search.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
<characteristic type="\Windows\Start Menu\Programs\Camera.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>

Loaded it in Sashimi and i saw a change. The camera icon was missing, but the search icon is still there. Perhaps, There is something wrong with the entry?
[Touch Pro, Fuze ROM Development] arvin2212:
An update :)

As suspected , i decided to test something out.

I made 2 instance of the .xml file

<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="\Windows\Start Menu\Programs\Search.ink" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
<characteristic type="\Windows\Start Menu\Programs\Camera.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>

<wap-provisioningdoc>
<characteristic type="FileOperation">
<characteristic type="\Windows\Start Menu\Programs\Album.ink" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
<characteristic type="\Windows\Start Menu\Programs\Album.lnk" translation="install">
<characteristic type="Delete">
<parm name="ForceDelete"/>
</characteristic>
</characteristic>
</characteristic>
</wap-provisioningdoc>

After that , i went through sashimi, and clearly enough, The Camera Icon and Album icon was removed. The search icon however remains. So i think there must be something wrong with the entry for the 1st part (firstfile.ink)

I hope Da_G or anyone else could check it, as i think it would be quite messy for me to create each seperate .xml for the icons.
[Touch Pro, Fuze ROM Development] crazyC:
does it say *.ink in the first part rather than lnk or do my eyes deceive me?