Editing MSI with OCRA

If you have worked with MSI then you probably know that it uses an internal database to store all kind of information and you can actually directly modify this information by using a great tool OCRA. It is tiny utility released by MSFT.

But unfortunately it is not “that” simple to get OCRA because it is not available as separate download , instead it is part of Windows SDK. Which means that if you want OCRA you have to download whole Windows 7 SDK. And even after downloading whole 1.4 Gb ISO, this tools is not easily visible. Once you download ISO (for x64 bit download), either make DVD or mount it as virtual drive (my preferred option) then go to \Setup\WinSDKTools_amd64 and open up cab1.cab. Inside that you will see WinSDK_Orca_Msi_5E20C107_DAA3_4D49_AFAE_7FB2594F0CDC_amd64 , extract that file and add extension .msi to it. And that is your installation for OCRA !! I really don’t know why such a great tool is hidden so deep by MSFT (and it is not the only great tool neglected by them). Once you install it you will see an additional entry “Edit with OCRA” in context menu whenever you right click on MSI.

ocra

Now about usage, for test I have created on Test MSI which when run, it will install one text file into chosen location. But I created this msi with no configuration which means when I will install this MSI, by default selected installation option will be  “Just Me” to install MSI only for me.

JustMe Me

But if I wanted to modify my MSI so that by default it selects “All Users” so that user doesn’t have to do extra click. Now I can do that either by firing up my Windows Installer project in VS, modify project and rebuild it or Use OCRA and directly modify MSI database. This second option is particularly helpful when you have just MSI and not the whole project (or you are just feeling lazy to open up VS 🙂 )

To modify MSI with OCRA just right click on file and select “Edit with OCRA”. It will open up MSI database in OCRA. Then find “Property” in tables. In that table look for property “FolderForm_AllUsers”. You will see that it has value “ME” which is indication that this MSI will have “Just Me” option selected for installation. Just select value and modify it to “ALL”. Save changes. And that’s it !!

All EveryOne

Now if you run MSI you will see that it has installation option “All Users” selected.

This was just a simple demo about how to use OCRA and as you can see it is very handy tool to modify MSIs on the fly Smile

That’s it for now…

It’s Just A Thought … Peace

Gaurang Sign

Leave a Reply

Your email address will not be published. Required fields are marked *