Vista Style Builder

   Home   Help Search Login Register  
Pages: [1]
  Print  
Author Topic: Tool to convert binary UIFILES to xml text  (Read 36819 times)
drakkar1969
Beginner
*
Posts: 59


View Profile
« on: November 13, 2014, 04:44:40 pm »

Ok so this is a command line tool (uib2t.exe) I developed to convert binary UIFILES to readable XML format.

It can either convert a single binary UIFILE resource file (previously extracted with a resource editor) or extract multiple UIFILEs from a system file and convert them. It does not modify system files in any way. If you don't trust that, just copy the system file somewhere else and extract from the copied file ...

This tool is only for 64 bit windows!

Code:
USAGE:

uib2t -file binfile

-or-

uib2t -sys sysfile id destfolder

Parameters:

-file Convert a single binary file to XML text (see notes)

binfile Binary file to convert. Fully qualified path, use quotes if contains spaces, can include environment variables

-sys Extract one or more binary UIFILE resources from a system file (.exe, .dll, ...) and convert to XML text

sysfile System file containing binary UIFILE resources to extract. Fully qualified path, use quotes if contains spaces, can include environment variables

id IDs of UIFILE resources to convert, can be:
- a single UIFILE ID (e.g. 40960)
- a comma separated list of UIFILE IDs (e.g. 23,24,25)
- * to include all UIFILE resources in the source file"

destfolder Destination folder for converted UIFILEs. Fully qualified path, use quotes if contains spaces, can include environment variables

EXAMPLES:

uib2t -file "D:\My Path\40960.raw"

uib2t -sys c:\windows\system32\explorerframe.dll 40960 e:\outpath

uib2t -sys "%SystemRoot%\system32\shell32.dll" 23,24,25 e:\outpath

uib2t -sys "%SystemRoot%\system32\ExplorerFrame.dll" * "d:\long path"

NOTES:

1. If multiple UIFILE IDs are specified with the -sys option, UIFILE resources that are in text format or cannot be converted will be automatically skipped.

2. When using the -file option, the binary file to convert must be in raw binary format (file extension is irrelevant). To extract UIFILEs from system files in raw binary format:

* Restorator: Resources menu -> Extract -> Extract as -> Extract as ".raw"
* ResHacker: Action menu -> Save resource as a binary file

The converted XML text file will be saved in the same folder as the source binary file (.uib2t.txt extension).

3. When using the -sys option, converted XML text file(s) will be saved in the destination folder specified as a parameter (.uib2t.txt extension).

Usage info above can be displayed by running the program without any parameters.

I have tested this on Windows 8.1 Update 1 without any issues - but it should work on any 8+ Windows version. Please use OldNewExplorer to test this, or make a backup if you're going to modify system files (which this tool does not do). I take no responsibility if you mess up your system!!!  Wink



UPDATE SEPTEMBER 2015

Tool updated to version 1.0.3 BETA. Now tested with Windows 10 RTM

Changes from previous version (1.0.2 BETA):
* Minor tweaks to conversion code
* Text output during conversion improved:
     - Errors and warnings are now highlighted in red
     - Destination folder for converted XML files now indicated in text output when conversion complete
* New program icon (courtesy of http://www.iconsdb.com/)
* Changes to command line parameters:
     - In -file mode, added an optional parameter to specify a destination folder to save converted XML files
     - In -sys mode, destination folder parameter is now optional. If omitted, converted XML files are saved in a sub-folder of the uib2t program

Updated usage information:

Code:
uib2t :: by drakkar1969 :: Version 1.0.3 BETA
Convert binary UIFILE resources to XML text format

This program DOES NOT MODIFY system files in any way

USAGE:

   uib2t -file binfile [destfolder]

-or-

   uib2t -sys sysfile id [destfolder]

Parameters:

   -file        Convert binary file(s) to XML text (see note 1)

   binfile      Binary file(s) to convert, specify multiple files using
                wildcards (* and ?). Path can be omitted if the files to
                convert are in the same folder as the uib2t program. If a path
                is specified, it must be a fully qualified path; use quotes
                if contains spaces, can include environment variables.

   destfolder   Optional parameter. Destination folder for converted XML text
                files. Fully qualified path, use quotes if contains spaces,
                can include environment variables. If omitted, converted XML text
                files will be saved in the same folder as the source binary files.

Parameters:

   -sys         Extract one or more binary UIFILE resources from a system file
                (.exe, .dll, ...) and convert to XML text

   sysfile      System file containing binary UIFILE resources to extract.
                Fully qualified path, use quotes if contains spaces, can
                include environment variables.

   id           ID(s) of UIFILE resources to convert, can be:
                - a single UIFILE ID (e.g. 40960)
                - a comma separated list of UIFILE IDs (e.g. 23,24,25)
                - * to include all UIFILE resources in the source file

   destfolder   Optional parameter. Destination folder for converted XML text
                files. Fully qualified path, use quotes if contains spaces,
                can include environment variables. If omitted, converted XML text
                files will be saved in a sub-folder of the uib2t program folder
                with the same name as the source system file (e.g. "shell32.dll"
                sub-folder).

NOTES:

1. When using the -file option, the binary file(s) to convert must be in raw
   binary format (file extension is irrelevant).

   To extract UIFILEs from system files in raw binary format:
   * Restorator: Resources menu -> Extract -> Extract as -> Extract as ".raw"
   * ResHacker: Action menu -> Save resource as a binary file

2. Converted XML text file(s) are saved with a .uib2t.txt extension.

3. When converting multiple UIFILE(s) (either source binary files or binary
   resources in a system file) UIFILE resources that are in text format
   or cannot be converted will be automatically skipped.
   An example is the RIBBON resource in ExplorerFrame.dll, which is not a
   binary UIFILE resource and cannot therefore be converted.

EXAMPLES:

* Convert a single binary file to XML text (file is in the uib2t program folder):

   uib2t -file 40960.raw

* Convert all .raw files in a folder to XML text, specifying destination folder:

   uib2t -file "D:\source path\*.raw" E:\destpath

* Extract a single UIFILE (40960) from ExplorerFrame.dll and convert to XML text:

   uib2t -sys c:\windows\system32\explorerframe.dll 40960 e:\destpath

* Extract multiple UIFILEs (23, 24 and 25) from shell32.dll and convert to XML
  text (environment variable used to specify source file); output XML files are
  saved in the "shell32.dll" sub-folder of the uib2t program folder:

   uib2t -sys "%SystemRoot%\system32\shell32.dll" 23,24,25

* Extract all UIFILEs from ExplorerFrame.dll and convert to XML text
  (environment variable used to specify source file):

   uib2t -sys "%SystemRoot%\system32\ExplorerFrame.dll" * "d:\long path"

* Extract all UIFILEs from ExplorerFrame.dll and convert to XML text; ouput
  XML files are saved in the "ExplorerFrame.dll" sub-folder of the uib2t
  program folder:

   uib2t -sys "c:\windows\system32\ExplorerFrame.dll"
« Last Edit: September 23, 2015, 03:40:58 pm by drakkar1969 » Logged
drakkar1969
Beginner
*
Posts: 59


View Profile
« Reply #1 on: November 13, 2014, 04:55:07 pm »

P.S. I have converted UIFILEs from the following system files with no issues (with OldNewExplorer):

- ActionCenterCPL.dll
- ExplorerFrame.dll
- FirewallControlPanel.dll
- PowerCpl.dll
- shell32.dll
- SystemCpl.dll
- ThemeCpl.dll
- Wucltux.dll
Logged
Dave Senior
Beta Tester
Dedicated Themer
*
Posts: 235

Why Windows 10 ? > 7 8 9 ??


View Profile
« Reply #2 on: November 13, 2014, 06:03:44 pm »

Thanks  mate  !
Logged
drakulaboy
Beginner
*
Posts: 62


View Profile
« Reply #3 on: November 13, 2014, 07:31:57 pm »

nice, gonna try it to some files from Windows 10, thank you!
Logged
Mr GRiM
Beta Tester
Dedicated Themer
*
Posts: 309


Master Theme Builder


View Profile
« Reply #4 on: November 14, 2014, 07:52:45 pm »

Thanks, I already had a similar tool from tyhiy to do this but it's always good to have options, plus I was never allowed to share his tool with anyone else.
Logged
3am
Beta Tester
Dedicated Helper
*
Posts: 2428



View Profile
« Reply #5 on: November 15, 2014, 02:10:25 pm »

This works great. Thanks Smiley


For people with little command line experience, like me, here's a way to get this running:

This is an example converting one UIFILE ( in this case UIFILE 23 in Shell32 extracted as 23.raw in Restorator) from the uib2t folder placed on my desktop. Change the name 3am to your name.

1) Put the 23.raw file in the uib2t folder containing uib2t.exe

2) Right-click on the uib2t folder on your desktop while holding down the SHIFT key and select 'Open command window here' from the popup menu

3) Type what you need so it looks like this:

C:\Users\3am\Desktop\uib2t>uib2t -file "C:\Users\3am\Desktop\uib2t\23.raw"      ( Don't forget the space between uib2t and -file)

and press enter

4) You'll see the message:

uib2t :: by drakkar1969 :: Version 1.0.1 BETA
Convert binary UIFILE resources to XML text format

Converting UIFILE C:\Users\3am\Desktop\Convert\23.raw to XML text

DUIB conversion completed:

        UIFILE 23.raw | OK

1 of 1 UIFILE(s) successfully converted to text

5) Now you will have a converted 23.uib2t.txt in the uib2t folder that you can edit, rename and place in your SHELL32_UIFILE resource folder in your custom shellstyle to use with OldNewExplorer
« Last Edit: November 20, 2014, 05:11:52 am by 3am » Logged
drakkar1969
Beginner
*
Posts: 59


View Profile
« Reply #6 on: November 15, 2014, 03:10:42 pm »

If you want to save yourself some typing: right-click on the uib2t folder on your desktop while holding down the SHIFT key and select 'Open command window here' from the popup menu. This will open up a command prompt already in the right folder - then just skip to step 5
Logged
3am
Beta Tester
Dedicated Helper
*
Posts: 2428



View Profile
« Reply #7 on: November 15, 2014, 03:32:22 pm »

Thanks for the tip. I fixed it in my post
« Last Edit: November 20, 2014, 05:12:48 am by 3am » Logged
tistou77
Dedicated Themer
*
Posts: 188


View Profile
« Reply #8 on: January 30, 2015, 08:49:23 pm »

Hello

Thank you for sharing

I do not really understand (sorry for my english), that is to modify shell32.dll oneself and have the same result as OldNewExplorer, for example?

If so, how I should proceed?

Thanks for your help
« Last Edit: January 30, 2015, 09:14:16 pm by tistou77 » Logged
drakkar1969
Beginner
*
Posts: 59


View Profile
« Reply #9 on: January 31, 2015, 07:21:36 pm »

Hello

Thank you for sharing

I do not really understand (sorry for my english), that is to modify shell32.dll oneself and have the same result as OldNewExplorer, for example?

If so, how I should proceed?

Thanks for your help

Basically some of the UIFILEs in shell32.dll and ExplorerFrame.dll (but also other system files) are encoded in a binary format that you cannot edit directly (for use e.g. with OldNewExplorer). So what most people do is use UIFILEs from previous Windows builds.

What this tool does is it converts the UIFILEs from binary format to a text format, that you can edit as you want and use with OldNewExplorer (so no need to use UIFILEs from previous builds)
Logged
tistou77
Dedicated Themer
*
Posts: 188


View Profile
« Reply #10 on: August 13, 2015, 12:49:45 am »

Hello

I try to use this "soft" to convert a binary, but it does not work
This is the binary "EXPLORER_RIBBON" of explorerframe.dll (extracted with Restorator in .raw
I was wrong ?

Quote
uib2t :: by drakkar1969 :: Version 1.0.1 BETA
Convert binary UIFILE resources to XML text format

Converting UIFILE C:\Users\tistou\Desktop\uib2t\test.raw to XML text

DUIB conversion completed:

        UIFILE test.raw | Skipped: not in DUIB format

0 of 1 UIFILE(s) successfully converted to text

Thanks

Logged
drakkar1969
Beginner
*
Posts: 59


View Profile
« Reply #11 on: August 13, 2015, 09:28:59 am »

Hello

I try to use this "soft" to convert a binary, but it does not work
This is the binary "EXPLORER_RIBBON" of explorerframe.dll (extracted with Restorator in .raw
I was wrong ?

Thanks



The EXPLORER_RIBBON resource in explorerframe.dll is unfortunately not a UIFILE resource (different format) and cannot be converted with this tool. sorry
Logged
tistou77
Dedicated Themer
*
Posts: 188


View Profile
« Reply #12 on: August 13, 2015, 01:03:48 pm »

Ok, thanks for your reply
Logged
MidSil
Beginner
*
Posts: 1


View Profile
« Reply #13 on: March 27, 2017, 09:40:20 pm »

Ok so this is a command line tool (uib2t.exe) I developed to convert binary UIFILES to readable XML format.

It can either convert a single binary UIFILE resource file (previously extracted with a resource editor) or extract multiple UIFILEs from a system file and convert them. It does not modify system files in any way. If you don't trust that, just copy the system file somewhere else and extract from the copied file ...


Hello,

Very good job, is there a chance to do the inverse?
I'm trying to edit the twinui.dll UIFILE resources to edit the XAML to prevent some items to show up (Setting, Search, ect) on a Windows 2012 server.
So I need to transform the XML to binary again, so I can replace the resouce with some tool (ResoureHacker).

Thanks,

--
Andre
Logged
tistou77
Dedicated Themer
*
Posts: 188


View Profile
« Reply #14 on: October 28, 2017, 05:00:15 pm »

Hello

I'm not sure I have an answer Tongue

Once I extract the binary resource (40960 of explorerframe.dll), use the software to convert it to .txt and "reintegrate" the .txt into the dll with Restorator for example
Is there anything else to do?
At reboot, the changes do not apply ... As if it kept "in memory before the changes"

Thanks

Logged
3am
Beta Tester
Dedicated Helper
*
Posts: 2428



View Profile
« Reply #15 on: October 28, 2017, 10:04:38 pm »

Nothing was changed because you just converted UIFILE 40960 into a text file without editing anything inside it.
Logged
tistou77
Dedicated Themer
*
Posts: 188


View Profile
« Reply #16 on: November 01, 2017, 07:16:04 am »

Thanks for your reply

I extract a 40960 binary from explorerframe.dll of Win10 1703, convert to txt and integrate into explorerframe.dll of Win10 1709
not same dll version of explorerframe.dll
Logged
3am
Beta Tester
Dedicated Helper
*
Posts: 2428



View Profile
« Reply #17 on: November 01, 2017, 01:04:49 pm »

That tells you that the 1703 40960 file is the same as the one in 1709.

Converting to a text file is done only to make it easier to read and edit.
Logged
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.12 | SMF © 2006-2009, Simple Machines LLC Valid XHTML 1.0! Valid CSS!