Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,731,698 Members 48,900 Now Online
XDA Developers Android and Mobile Development Forum

[APP][01.08.2011]SettingsExporter v0.1 beta – customisable registry backup

Tip us?
 
Skrobel
Old
(Last edited by Skrobel; 19th September 2011 at 01:41 PM.)
#1  
Skrobel's Avatar
Senior Member - OP
Thanks Meter 63
Posts: 829
Join Date: Jan 2010
Location: Piaseczno
Lightbulb [APP][01.08.2011]SettingsExporter v0.1 beta – customisable registry backup

Hello,
I present my second Windows Mobile app:

SettingsExporter – I think the name is self-explaining. I tried to develop an easy to use application able to backup the vital system/user/programs settings and parameters to a .reg file, which enables the user to quickly restore the settings after a flash or HR.
Yes, we already have the fantastic fdcTaskManager from dotFred but this one exports either single registry key (with all the values and subkeys) or whole registry. My tool is able to store:
- single registry value
- several registry values in one key
- all the values of a key but without subkeys
- values which names start with a certain string
- values which names end with a certain string
- values containing certain string
- whole key with all subkeys/values

The last point is realized with a help of already mentioned fdcTaskManager under permission from dotFred (thank you Man!).

Program features/requirements:
- supports AppToDate
- requires NetCF 3.5 to be installed in your ROM.
- the app is partially dependent on the TaskManager from DotFred. A file called dotTaskMgr.exe should always be placed in program folder. Of course it is included in the download files.
- the program can run from any folder on both device memory or Storage Card. You don't even have to install it (that's why I included also a zip archive with all the files), you can just run it from the actual location. However the installation cab includes also program shortcuts (they appear in Start Menu) and files neccessary for AppToDate.
- REMARK: Because of .NetCF limitations the program cannot parse some of the value kinds, like REG_MUI or REG_QWORD however these types are used in so deep system settings that I wouldn’t even try to touch, so from this point of view they are not necessary for normal user customization purposes.

REMEMBER: never play with registry unless you know what you are doing. Always make backup of your data before you start to edit any registry values.
I spent many nights on testing this app and on choosing the settings worth exporting so everything should work fine (I made at least 10 flashes in the mean time and didn’t discover anything suspisious). However I cannot be held responsible for any damages to your ROM/device.


Below you can find my screenshots and download.

In following posts you can find also:
  • Program description - post #2
  • INI file syntax and notes - post #3
  • Description of default .ini files - post #4
Attached Thumbnails
Click image for larger version

Name:	SE1.png
Views:	361
Size:	39.3 KB
ID:	673907   Click image for larger version

Name:	SE3.png
Views:	214
Size:	24.3 KB
ID:	673908  
Attached Files
File Type: cab SettingsExporter_v0.1_beta.cab - [Click for QR Code] (401.0 KB, 348 views)
File Type: zip SettingsExporter_v0.1_beta.zip - [Click for QR Code] (420.0 KB, 120 views)
The Following 6 Users Say Thank You to Skrobel For This Useful Post: [ Click to Expand ]
 
Skrobel
Old
(Last edited by Skrobel; 2nd August 2011 at 12:12 AM.)
#2  
Skrobel's Avatar
Senior Member - OP
Thanks Meter 63
Posts: 829
Join Date: Jan 2010
Location: Piaseczno
Default How does it work?

Currently the SettingsExporter is basically a registry parser reading thru one (or more) of three config files (keys_....ini) in which the user puts keys/values that are supposed to be backed-up. For each line which is recognized as a registry value the program tries to gather it from the registry and writes to a (specified) text file as Microsoft Registry Entries (.reg) syntax. If the line is not recognized as a correct registry key/value or if it does not exist in the device’s registry, it is simply ignored.

Following the tip from Jackos (thanks Man!) there can be three config (.ini) files:
- keys_System.ini
- keys_Manila.ini
- keys_Other.ini

The user can choose to process one, two or all three .ini files. He can also choose if all the entries from the checked .ini files should be stored in one .reg file or the program should create one .reg file for each .ini file. This way we can divide our backup into groups and then restore them on different ROM (e.g. with different version of UI).


The main screen of the program consists of 5 main elements:
- “Current file path” text box with current path and name of the destination file. The path is initially set to \Storage Card\Backup\MyBackup.reg, but it can be changed either directly in this text box or using “Change File Name” button which opens the SaveFileDialog allowing you to choose a location and name for your destination file. Unfortunately the native .NetCF SaveFileDialog is poor and allows only to save in 2 folders depths, so this is the reason why I left the text box unlocked to allow manual editing of the path. Additionally when closing SettingsExporter saves last used path in registry so when you open it for the second time the initial path will be “yours”. This feature can be switched off in options.
- 3 checkboxes allowing you to choose which .ini files the app should process
- Save File button starting the Backup procedure
- Menu softkey allowing you to change the program options
- Exit softkey that (surprisingly) closes the application.



The Options screen (you can open it via Menu -> Options) is also very simple:
- Save all settings in one file – when you tap “Save File” all the .ini files which are “checked” in the main window will be processed and the effect will be saved in one file mentioned in the “Current file path” text box in the main window.
- Save in separate files – the “checked” .ini files will be processed but this time the effects will be stored in separate files. There will be separate destination files created basing on the same file name from the “Current file path” text box, but with appropriate suffix, so using the default MyBackup.reg file name, the destination files will be MyBackup_System.reg, MyBackup_Manila.reg, MyBackup_Other.reg.
- Backup previous output files – if any of the output (destination) files already exists it will be copied with “_old” suffix before writing new file.
- Associate Reg Files to fdcTM – this button associates the files with .reg extension to the fdcTaskManager which is located by default in the program directory. From this point on you can tap on a .reg file in File Explorer and it will be automatically imported to the registry. Use this function to easily restore your .reg files.
- Save last backup path – this option enables saving last used backup (destination) path upon program exit. Remember – the path is written to registry when you close the program. So if you configured the .ini file to store also SettingsExporter’s settings (stored in HKCU\Software\Skrobel\SettingsExporter) and you want to backup also this setting, you have to set the file path in the Main Window, then Exit the program (to write the path to registry) then open the program again and now you can press “Save File”.
The Following 2 Users Say Thank You to Skrobel For This Useful Post: [ Click to Expand ]
 
Skrobel
Old
(Last edited by Skrobel; 2nd August 2011 at 12:47 AM.)
#3  
Skrobel's Avatar
Senior Member - OP
Thanks Meter 63
Posts: 829
Join Date: Jan 2010
Location: Piaseczno
Default ini files requirements

The .ini file should be a Unicode text file stored in the same folder that the program executable is stored. The names of the file must be exactly one of the names mentioned above (keys_System.ini, keys_Manila.ini, keys_Other.ini). Of course the “keys_Manila.ini” file is not reserved ONLY for values connected with Manila/HTC and the “keys_System.ini” doesn’t need to contain ONLY system settings. It’s my proposal for the entries grouping, but you can change the contents according to your own needs. Only leave the file names intact.

About the syntax:
I tried to make the syntax of these .ini files as simple as possible. So it’s really similar to the syntax of a normal .reg file, exctept it does not need a “REGEDIT4” nor “Windows Registry Editor Version 5.00” at the beginning and of course the values cannot be given next to the valuenames. Here are some examples of the content of an ini file:
Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\WIDCOMM\Connections]*
[HKEY_LOCAL_MACHINE\nls\overrides]
*
[HKEY_CURRENT_USER\Software\Microsoft\Inbox\Settings]
"SMSDeliveryNotify"
"SMSAvailable"
"SMSUnicode"
[HKEY_LOCAL_MACHINE\SOFTWARE\HTC\QuickGPS]
actSync
auto
roaming
[HKEY_CURRENT_USER\SOFTWARE\HTC\MANILA]
Manila://*
"Weather*"
*Co0kie*
*Enabled
And what does it mean?
Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\WIDCOMM\Connections]*
It means that the specified key will be stored with all it’s values and subkeys (if there are any).

Code:
[HKEY_LOCAL_MACHINE\nls\overrides]
*
This one means that all the values under the [HKEY_LOCAL_MACHINE\nls\overrides] will be stored but without any subkeys.

Code:
 [HKEY_CURRENT_USER\Software\Microsoft\Inbox\Settings]
"SMSDeliveryNotify"
"SMSAvailable"
"SMSUnicode"
[HKEY_LOCAL_MACHINE\SOFTWARE\HTC\QuickGPS]
actSync
auto
roaming
In these two cases only the mentioned values will be stored from the specified key.

Code:
[HKEY_CURRENT_USER\SOFTWARE\HTC\MANILA]
Manila://*
"Weather*"
*Co0kie*
*Enabled
And this is an example of using regular expressions.
Manila://* - means that all the values with names starting with “Manila://” will be saved
*Enabled - means that all the values with names ending with “Enabled” will be saved
*Co0kie* - means that all the values with names containing “Co0kie” will be saved

As you can see the quotes are ignored so you can put valuenames with or without them and it will not make any difference for the parser.

The current version of the program includes my .ini files that are a result of long and careful tests and save most of the configuration of WM6.5 and WM6.5.x. I created these .ini files on HTC Rhodium and different Jackos ROMs. Most of them should work on a variety of HTC devices, however I've already seen that many settings for HTC Kaiser is stored in different locations than on Rhodium. But as I wrote before: if a registry key/value mentioned in the .ini file is not found in the actual registry, it will not be stored in any form.

On the other hand some of the key names may not work or not exist on different devices/ROMs. Especially when you try to restore a bunch of settings taken from a Sense 2.5 ROM on a Titanium or CHome ROM, you should expect some problems. That’s where grouping comes in handy.

If you have ideas for other registry values which should be backed-up by default or settings for popular third party programs I don’t use, please share key/value names here with a short description of what the values mean. I will put them in the default .ini files so other users can benefit from them.
The Following User Says Thank You to Skrobel For This Useful Post: [ Click to Expand ]
 
Skrobel
Old
(Last edited by Skrobel; 2nd August 2011 at 01:12 AM.)
#4  
Skrobel's Avatar
Senior Member - OP
Thanks Meter 63
Posts: 829
Join Date: Jan 2010
Location: Piaseczno
Default What settings are included in default .ini files

Quote:
keys_System.ini
In this file I included many settins which are changed via standard Windows Mobile Control panel applets and a bit from Advanced Config:
- notifications settings (remember - when you restore these settings after a flash, you have to make sure your ringtones and sound files must be in the same places that they were during backup)
- locale/time zone information (no language specific settings, only message coding, date/time/number formats, locale and time zone)
- messaging settings like threading, delivery report, unicode etc.
- paired Bluetooth devices
- owner information
- volume settings
- screen off/suspend timeouts
- some phone/dialer settings
- Font size/Clear type
- basic ArcSoft MMS settings
- last used profile
- clock/alarm settings
- AGPS
- hardware button assignment (only Long Press Send Key on Rhodium)
- Long Press EndKey action
- some other settings like noise reduction, AGC, USB to PC and less important parameters

Quote:
keys_Other.ini
In here I stored some of the third-party applications I use. Please propose other applications with their settings and I'll add them:
- PimBackup
- HTCAccountManager
- Palringo
- Total Commander
- RSS Hub
- SK Tools
- Spb Backup
- cleanRAM
- Skype
- ultrashot UTask
- Quick Shutdown
- QuickGPS
- Whip2Snap
- last but not least - own SettingsExporter settings

Quote:
keys_Manila.ini
Manila has many versions with extremely different settings and behaviours so I tired to store ONLY the most basic settings which should work on all the manila versions (correct me if I am wrong):

[HKEY_CURRENT_USER\SOFTWARE\HTC\MANILA]
HomeBackgroundPath - self explaining
AnimationWallpaperFolder - default folder for "choose background" option
Home.WallpaperMode - setting connected to full screen weather animation
Manila://* - this allows to store the configuration of showed/hidden Sense tabs
"Weather*" - settings for Manila weather

Of course I could add here all CHT settings, but there are also different versions of CHT on the "market" so I personally prefer to use CHT Editor backup/restore functions than to try to make universal backup utility for Co0kie settings. But if you guys have some hints on this topic I appreciate any help.
I will try to post here detailed description of all the values I know and will try to add here all suggestions from the community. But this unfortunately depends on my free time...
The Following User Says Thank You to Skrobel For This Useful Post: [ Click to Expand ]
 
Skrobel
Old
#5  
Skrobel's Avatar
Senior Member - OP
Thanks Meter 63
Posts: 829
Join Date: Jan 2010
Location: Piaseczno
this is post #5
 
Skrobel
Old
#6  
Skrobel's Avatar
Senior Member - OP
Thanks Meter 63
Posts: 829
Join Date: Jan 2010
Location: Piaseczno
post #6 just in case...
Crrently: HTC One

Previously: HTC Touch Pro2
-----------------------------------------------
My contributions to the community:
 
Jackos
Old
(Last edited by Jackos; 2nd August 2011 at 05:13 AM.)
#7  
Jackos's Avatar
Recognized Developer
Thanks Meter 446
Posts: 3,462
Join Date: Feb 2008
Location: Wrocław/Breslau
Congratulations on your release I'll try and report back soon!
Read my reviews and editorials at ION!
"From my experience - it looks like the most popular ROMs have the worst memory management " - ultrashot

Primary: Sony Xperia Z2 D6503

Sold: Samsung Galaxy S III I9300, HTC Sensation Z710e, HTC Touch Pro2 T7373 (Sold to Skrobel)

Haswell RIG: MSI Z87 MPOWER; Intel Core i7-4770K; Corsair Vengeance Pro 2133Mhz CL11 16GB; 2x EVGA GeForce GTX 760 SC ACX w/ backplate SLI; Intel SSD 530 180GB; 2x WDC Black 3TB RAID0; 3x WDC Black 1TB RAID5; CHIEFTEC BPS-750C2; Fractal Design Define R3 w/ USB3; Logitech Performance Mouse MX + Wireless Illuminated Keyboard K800; Samsung PX2370; Windows 8.1 RTM Genuine

 
c_shekhar
Old
#8  
c_shekhar's Avatar
Recognized Developer
Thanks Meter 32
Posts: 1,941
Join Date: Jun 2005
Looks great.........
Please -DONATE


Samsung Galaxy S Plus
My own ROM
GB 2.3.6 KQE/Feamod NOC 1.4Fix/SkyHigh Kernel 1.4d

HTC HD2
My HD2 3.04.23569bCS (Build 23563.5.5.0)

HTC Touch Diamond
My Diam 2.10.21051A.CS (Build 21051.1.6.3)
My Diam 2.11.21056c.CS (Build 21056.1.6.9)

HTC Touch Cruise
My Pola ROM 1.60.21014aCS (Build 21014)
My Pola ROM 1.60.931aCS (Build 20931)
Radio 1.58.25.14

HTC Himalaya
My Hima ROM 6.1.2a16CS(build 19209)
My Hima ROM 6.1.1c16CS(Build 19199)
 
poyensa
Old
#9  
poyensa's Avatar
Forum Moderator / Recognized Developer
Thanks Meter 2538
Posts: 3,109
Join Date: Apr 2010
Location: mi patria en mis zapatos
oh thanks a lot! i like to play a lot with co0kie home tab 2.0 and also with the registry so it will be very useful to save some lines of a reg key. In CHT 2.0 all setting are in hkcu/software/htc/manila/CHT.*** (also CHTE.*** and CHTI.***) and i would like to save registry setting like CHT.Tweaks.***

I will try and report back later. Thanks again!
 
Jackos
Old
#10  
Jackos's Avatar
Recognized Developer
Thanks Meter 446
Posts: 3,462
Join Date: Feb 2008
Location: Wrocław/Breslau
Quote:
Originally Posted by c_shekhar View Post
Looks great.........
It looks ****, but works great
Read my reviews and editorials at ION!
"From my experience - it looks like the most popular ROMs have the worst memory management " - ultrashot

Primary: Sony Xperia Z2 D6503

Sold: Samsung Galaxy S III I9300, HTC Sensation Z710e, HTC Touch Pro2 T7373 (Sold to Skrobel)

Haswell RIG: MSI Z87 MPOWER; Intel Core i7-4770K; Corsair Vengeance Pro 2133Mhz CL11 16GB; 2x EVGA GeForce GTX 760 SC ACX w/ backplate SLI; Intel SSD 530 180GB; 2x WDC Black 3TB RAID0; 3x WDC Black 1TB RAID5; CHIEFTEC BPS-750C2; Fractal Design Define R3 w/ USB3; Logitech Performance Mouse MX + Wireless Illuminated Keyboard K800; Samsung PX2370; Windows 8.1 RTM Genuine


Tags
backup, export, parser, registry, settings exporter
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes