MortScript Help: Parsing a text file and storing values in the registry - General Questions and Answers

I have a text file seperated by several lines. Its sort of like an XML file, just custom made.
It looks something like this:
<Time1>
-Schedule: 8:00 PM
-What: Doctor
<Time2>
etc...
Can someone show me an example of how I would parse this file? What I wanted to do is the following:
I have five time locations Time1, time2, etc... They each have the category -Shedule and -What. I want to sort through all the Times. In each time I want to extract the info that appears AFTER -schedule and AFTER -what (EG: 8:00PM, Doctor) and insert it into the registry. The registry would be formed like:
HKLM Schedulertime\ With sub directories of Time1, time2, etc... In each time there would be a string (I guess) of Shedule and of What. And the script would insert the values into each time in the registry.
Can someone write a script showing me how its done? Thanks in advance.

Related

Location of Outlook signatures and ringer profiles?

Hello,
I've done some looking (exporting and comparing .reg files of the registry) and am unable to find either of the following two bits of info:
The outlook signatures
and
the ringer profiles
I'd like to edit the signature to hopefully contain HTML, and add a few ringer profiles.
Any help is appreciated.
Thanks,
Matt
[edit]
Minor progress with profiles:
Create a key in HKCU\ControlPanel\Profiles
with the following values: String {name:"LocName", value:[name in list]}; DWord {name:"Order", value:[next in list, e.g. 6], name:"Name", value:[name]}; }
Access .\Application Data\Profiles and copy one of the [name from reg value].prof.xml files and rename to (if you don't have one, modify the normal profile and the file will be created).
Pretty simple.
thanks

Making a cab - a small tutorial

Because people asked and didn't find the threat on MoDaCo, a small tutorial here. The example is from my Slide Panther theme, there is another one in make.zip. You have to write an *.inf for each cab you want to create. I t contains all files from a specific location and where they will be copied to. You can also specify reg keys.
[Version]
Signature = "$Windows NT$" <-- no changes needed
CESignature = "$Windows CE$" <-- no changes needed
Provider = "frauhottelmann" <-- change to your name
[CEStrings]
Appname="slide panther" <-- the name that will be displayed in the programs menu in settings
[CEDevice] <-- you don't have to change this for the vox
ProcessorType=0
VersionMin=5.2
VersionMax=6.0
[SourceDisksNames]
1=,"Source1",,"Home" <-- specify the name of your source and then the folder with your files (should be in the same location of the *.ini)
[SourceDisksFiles] <-- All files you want to copy have to be here. The 1 stands for Source1 mentioned above, if you have more than one sources (folders) you have to add it above and add an = 2 ... to the end of the corresponding files!
"Slide Panther.home.xml"= 1
"panther.jpg" = 1
"pantherlc.jpg" = 1
[CopyFiles1] <-- Here you have to list the files for one destination folder on the phone. More than one destiantion means more [CopyFiles2] etc.
"Slide Panther.home.xml"
"panther.jpg"
"pantherlc.jpg"
[DestinationDirs] <-- Specify the destinations for the above
CopyFiles1=0,"\Application Data\Home"
[RegData] <-- add reg data, the following is for string values, I don't know how to add dwords, but I never needed it!
HKCU,ControlPanel\Home,Scheme,,\Application Data\Home\Slide Panther.home.xml
[DefaultInstall] <-- Finally specify what you want to be installed, here every destination dir and reg data should be included
CopyFiles=CopyFiles1
AddReg=RegData
Click to expand...
Click to collapse
Once your done with your *.inf, just drag'n'drop it onto the cabwiz.exe and it'll make a cab with the same name as the *.inf! Now you can install it!
Or the alternative, use this program!
BIIIIIIIIIIIIG thx to the german guy ;D
but don't we have to change the versionmax to 6.1 or we will get this stupid "this prog may not display correctly" message??
No, this is the version of WinCE not Windows Mobile, which is still at 5.2...!
Can this be used to install changes to the registry that will be lost after a hard reset?
Roland
Yes everything you install with a cab is lost after hard reset
Nice work...as always...
/**still waiting for german emulator image......same here for italian's one. **/
could you please be a bit more precise about those regkeys? what are all these commas? what are the folder, keys, values?
HKCU,ControlPanel\Home,Scheme,,\Application Data\Home\Slide Panther.home.xml
Click to expand...
Click to collapse
HKCU = HKEY_CURRENT_USER
then after the comma the "folder" path, after the next comma the key name
then after the next comma comes the reg key type, so none is for a string, for others you have to search, because I don't know them. And finally after the last comma comes the value of the reg key!
funny thing, now that i was looking for th value-types i found the tutorial on modaco.
http://www.modaco.com/content/Smart...iscussion/235885/Tutorial-Creating-Cab-Files/
and here are the flags for diferrent types of registry entries:
[add_registry_section]
registry_root_string , subkey,[value_name], flags, value[,value]
[registry_root_string, subkey,[value_name], flags, value[,value]]
registry_root_strings
String that specifies the registry root location. The following table shows the values that are supported by Windows CE.
Root string Description
HKCR The same as HKEY_CLASSES_ROOT
HKCU The same as HKEY_CURRENT_USER
HKLM The same as HKEY_LOCAL_MACHINE
value_name
Registry value name. If empty, the "(default)" registry value name is used.
flags
Numeric value that specifies information about the registry key. The following table shows the values that are supported by Window CE.
Flag Value Description
FLG_ADDREG_NOCLOBBER 0x00000002 If the registry key exists, do not overwrite it. This flag can be used in combination with any of the other flags in this table.
FLG_ADDREG_TYPE_SZ 0x00000000 The REG_SZ registry data type.
FLG_ADDREG_TYPE_MULTI_SZ 0x00010000 The REG_MULTI_SZ registry data type. The value field that follows can be a list of strings separated by commas.
FLG_ADDREG_TYPE_BINARY 0x00000001 The REG_BINARY registry data type. The value field that follows must be a list of numeric values separated by commas, one byte per field, and must not use the 0x hexadecimal prefix.
FLG_ADDREG_TYPE_DWORD 0x00010001 The REG_DWORD data type. Only the non-compatible format in the Win32 Setup .inf documentation is supported.
The following code example shows a typical [AddReg] section.
AddReg = RegSettings.All
[RegSettings.All]
HKLM,%reg_path%,,0x00000000,alpha ; <default> = "alpha"
got it from here http://www.sundialsoft.freeserve.co.uk/cabinfo.htm
could it be that we need to make a .inF (as it says in the instructions) file and not a .inI file?
Is it possible to delete registry entries??
Yes it's inf sorry. And I am not aware of a way to delete reg key with cabs!
Hi frauhottelmann,
It is realy great starting point for CAB maker. I will use this instructions for making my Sliding Panel Default Green cab for 6.1 ver 1.1 ROM.
I have found something really great for cab makers: http://www.gpcarreon.com/?p=524
Haven't tried it though!
EDIT: Under Vista it does, unfortunately, not work!
It DOES work, in compatibility mode!

Question for ROM cooks - possible to change system folders?

Advanced Config has a section for setting new values for "My Documents", "My Ringtones", etc. but many of them don't actually work.
I'd love to be able to use "\Donny" instead of "\My Documents", etc.
Call it irrational, but I *HATE* the Windows defaults of "My [whatever]". I always change them (via the registry) on my desktop/laptop PCs, and it drives me nuts that I can't do it in WM.
So, is it possible during the ROM cooking process to make such changes? Or are they simply hard-coded into the WM OS.
If they're hard-coded, is it in a single DLL? (That I could maybe hack with a hex editor?)
These are all variables that you can control at the time of cooking, by editing various .rgu's in the system folder. Look to the folders with Lang or 0409 (or your regional code) in the name, as these are the language-localization strings.. all folder names are considered language-localized as "My Documents" is obviously different in each language
Use a text editor that supports unicode such as EmEditor to edit these .rgu's.
Hope it helps!
That's AWESOME! I've been looking for a reason to start cooking... now I have one!
One follow-up question, if I may...
Instead of hard-coding the values, can you tell it to look in the registry (so the "Shell" entries actually work)?
Thanks for the reply!
The .rgu's represent the registry as it's compiled by the ROM kitchen, so editing the .rgu's will have the same effect as editing the registry.
Da_G said:
The .rgu's represent the registry as it's compiled by the ROM kitchen, so editing the .rgu's will have the same effect as editing the registry.
Click to expand...
Click to collapse
Not sure if you're missing my point or if I'm not understanding you.
If the .rgu's represent the registry as it's compiled then the locations for My Documents, Program Files, etc. would all be hard coded in the ROM, and once again, changing the settings in HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders won't actually do anything. Right?
So, I'm asking if there's a way to put some sort of magic pointer (or maybe leave it blank?) to say, "If you want to know the location of 'My Documents', check the registry settings at HKCU\....\Shell Folders"

How do i customize the Start Menu pre-build?

I'd like to customize the start menu prior to building, I'm using win mob 6.5 Build 23569 & OSKitchen Zero .
So far i've made a .reg injection file in EXT packages and been able to add reg entries for folders and also point them to their Icon.
But the folders only show up if I manually make the folder after the rom has been compiled and flashed.
The icons at least work then, But even if i put a reg entry inside them - Inside my .reg injection (Like Calculator) under HKLM/Security/Shell/StartInfo/Start this does not show up. (If i copy it from Windows/Start Menu into the Tools folder
made after flashing it does though)
I believe I am missing putting in the new Start menu file structure somewhere (Like the physical directories) but i'm not sure where I should put them as the /WINDOWS/Start Menu/Programs folder doesn't exist yet & all the .lnk shortcuts are not structured anywhere.
Sorry for my ramblings, I have tried searching and reading lots of posts but cannot find anything specific.. If you could help, even just by pointing me in the right direction I'd be happy as
My goal is just to be able to organise a structure (TOOLS/ACCESSORIES/INTERNET etc) in the start menu rather than just have all the items plonked everywhere.
Thanks
I've found my answer - Edit initflashfiles.dat (Change extension to .txt)
I will write a guide shortly as it's very hard to find.
Thanks

Do you want Binary and Multistring values registry editor?

Hi friends. I am working on registry plugin for Phone Commander. There is possible to make Binary and Multistring values management, but it will a lot of to do. Could you anybody use it? For example for language changing etc. I found no one WP7 registry editor able to write those values (Schapman's one can read it only, my very old HTC7ProMultistring.xap and Hex2Base64.xap can prepare ProvXML code for importing only). I do not want to lost time for unusing feature, post your mind.

Categories

Resources