Wix Formatted File Identifier
WiX is an installer language based on XML, a toolset that builds Windows installation packages MSIs from XML files. It is quite easy to configure an MSI using WiX as it is powerful and flexible. WiX solved a lot of problems such as having a web application deployment together with regular Windows application.
Strings appearing in control texts can be formatted. We have already used property names in square brackets but there are more complicated rules around here, too. First if the property name is not valid in [Property]
, the whole substring is left unchanged.
This rule is somewhat different if the square brackets are nested. [[Property]]
will first look up Property
, then use its value as another property name, then look this second property up. In any of these property names are not found, the whole substring will be considered an empty string.
Blackslashes can be used as escape characters to denote characters otherwise having special meaning (like square brackets).
The substring [~]
is replaced with a null character. This makes is possible to compile REG_MULTI_SZ registry strings.
The [#filekey]
notation will return the full path of the file with the specified Id
but only after CostInitialize, FileCost or CostFinalize have been run. The path will depend on whether the file belongs to a component that is installed locally or from the source.
The [$componentkey]
notation will return the install directory of the specified component but only after CostInitialize, FileCost or CostFinalize have been run. The path will depend on whether the file belongs to a component that is installed locally or from the source.
The [!filekey]
notation is usually equivalent to [#filekey]
with the exception of the Value
attribute of Registry
or IniFile
tags. In these cases, it will return the full short path of the file.
WiX makes it possible to inject strings defined outside (eg. on a command line) to be used in the source. The compiler, Candle, supports preprocessor variables and uses the $(var.Foo)
syntax. You can provide the value either in the source file itself:
or with a command line switch:
Light, the linker, has a similar scheme with bind-time variables and uses a slightly different syntax: !(wix.Foo)
. The command line is similar:
Localized strings use the !(loc.Foo)
notation. The linker expects these strings to be provided in a .wxl
localization file with the syntax:
The localization file is also specified on the command line:
The main difference between localization and other string is the overridable nature of the former. While a library or extension module can have a default value for the string, it can be overridden late during the process of linking.
In order to assign any of these values to a regular Windows Installer property, use the Property
tag: Altium library manager job.
Environment variables can be accessed using the $(env.Foo)
syntax.
Questa pagina in italiano |
TrID - File Identifier
TrID is an utility designed to identify file types from their binary signatures. While there are similar utilities with hard coded logic, TrID has no fixed rules. Instead, it's extensible and can be trained to recognize new formats in a fast and automatic way.
TrID has many uses: identify what kind of file was sent to you via e-mail, aid in forensic analysis, support in file recovery, etc.
TrID uses a database of definitions which describe recurring patterns for supported file types. As this is subject to very frequent update, it's made available as a separate package. Just download both TrID and this archive and unpack in the same folder.
The database of definitions is constantly expanding; the more that are available, the more accurate an analysis of an unknown file can be. You can help! Use the program to both recognize unknown file types and develop new definitions that can be added to the library. See the TrIDScan page for information about how you can help. Just run the TrIDScan module against a number of files of a given type. The program will do the rest.
Because TrID uses an expandable database it will never be out of date. As new file types become available you can run the scan module against them and help keep the program up to date. Other people around the world will be doing the same thing making the database a dynamic and living thing. If you have special file formats that only you use, you can also add them to your local database, making their identification easier.
To get you started, the current library of definitions is up to 12509 file types and growing fast.
TrID is simple to use. Just run TrID and point it to the file to be analyzed. The file will be read and compared with the definitions in the database. Results are presented in order of highest probability.
Wildcards can be used to scan groups of files, entire folders, etc. In addition, using the switch -ae will instruct TrID to add the guessed extensions to the filenames. This come handy, for example, when working with files recovered by data rescue softwares. For example:
At this point, the files in the c:temp folder will look like:
FILE0001.CHK.bav
FILE0002.CHK.ogg
FILE0003.CHK.doc
FILE0004.CHK.exe
Instead, the switch -ce will just change the file extension to the new one; if the file has no extension, the new one will be added. For example:
IAmASoundFile.dat -> IAmASoundFile.wav
IAmABitmap -> IAmABitmap.bmp
TrID can get a file list from stdin, with the -@ switch.
So it's possible to work on an entire folder tree, or a particular subset of files, just using the output of some other command through a pipe. Something like:
It's possible to tell TrID to show some more information about every match (such as the mime type, who created that definition, how many files were scanned, etc.); and it's also possible to limit the number of results shown.
The switch -v activate the verbose mode, and -r:nn specifies the max number of matches that TrID will display. Default is 5 for normal mode, 2 for verbose, 1 for multi-files analysis.
When starting, TrID will check for the TrIDDefs.TRD definitions package in the current directory. If not found, it will search on the some folder where TrID is installed. Eventually, it's possible to specify a particular defs file with the switch -d:filespec. To force TrID to wait for a key after showing the results, the -w switch is provided.
To speed up the process of getting the latest updated definitions, it's possible to use the TrIDUpdate Python script. It first compare the MD5 digest of the current TRD file and the one available online, so if the file isn't changed it's very quick. For example:
For any info or question, feel free to contact me or take a look in the forum! |
Download
TrID is free for personal / non commercial use.Win32 | TrID v2.24, 47KBZIP - (PGP sig) |
Linux/x86 | TrID v2.24, 357KBZIP - (PGP sig) |
Linux/x86-64 | TrID v2.24, 421KBZIP - (PGP sig) |
TrIDUpdate v1.10, 1KBZIP (Python required) | |
TrIDDefs.TRD package, 1473KBZIP (12509 file types, 02/03/20) |
TrID's Definitions DB changes log feed!
If TrID proved useful to you, maybe you can write a comment here in the forum!
If you like TrID, you may consider a little donation!
Even a couple of $ or mBTC will let me know that you appreciate my work! Thanks!
Bitcoin:1Mark1tF6QGj112F5d3fQALGf41YfzXEK3
Change Log TrIDUpdate v1.10 (all platforms) - 03/03/2017: TrID v2.24 (all platforms) - 04/04/2016: TrID v2.20 - 09/04/2015: TrID/Linux v2.12b - 30/03/2015: TrID/Linux v2.11 - 07/12/11: TrID/32 v2.10 - 14/02/11: TrID/32 v2.02 - 11/01/07: TrID/32 v2.00 - 04/06/06: TrID/32 v1.56 - 22/12/04: TrID/32 v1.55 - 20/11/03: TrID/32 v1.50 - 15/11/03: TrID/32 v1.23 - 13/08/03: TrID/32 v1.00 - 07/06/03: |