11

I need to take some resources from SOURCE.PRI file, modify certain values, then create TARGET.PRI file, which has the exact same content as SOURCE.PRI, except the modified values mentioned above.

There are a couple of PRI file extensions, I am referring to the compiled resource files used by Windows Store apps (more info).

I am assuming that, since .PRI files are already compiled, there is no way to read them, character by character, with simple text parser.

Therefore, I am looking for a way to compile and decompile the .PRI file.

Did anyone find a way to do this?

Bobby5193
  • 1,585
  • 1
  • 13
  • 23
  • 5
    The format is undocumented. You can decompile them with `makepri.exe dump` – Hans Passant Feb 05 '13 at 20:12
  • i know about the makepri.exe , but am I allowed to use this if i have a custom application that I am going to sell to clients? – Bobby5193 Feb 07 '13 at 19:01
  • No, it is not a distributable component. You'll need to write this off as a viable strategy if this is supposed to happen at runtime. Pretty unclear why you are contemplating this btw, you can't even get write access to the directory. – Hans Passant Feb 07 '13 at 19:06
  • 3
    `MakePri.exe dump /if C:\MyApp\resources.pri` – Sahil Singh Jul 22 '17 at 19:22

2 Answers2

7

In this github project they edited the .pri file in order to change the logon screen.

You can try and look what they did there and how to accomplish that with your own project.

Although it's been a long time since the question was asked, I think it's still good to have an answer here that will guide anyone who's interested in doing that and arrived here.

arieljannai
  • 2,124
  • 3
  • 19
  • 39
1

https://learn.microsoft.com/en-us/windows/uwp/app-resources/makepri-exe-command-options#dump-command

You can use the makepri.exe tool itself to dump the contents in to an xml format.

You can also open it in a text editor and somewhat make out the contents, though most of it is in binary.

lozzajp
  • 916
  • 7
  • 15