Hi Tibor,
Adding binaries to MSI and then reading them from msi DB is nothing else but a use case of adding user specified binaries to the resources and reading them at runtime. The binary itself is not deployed thus you cannot possibly read it from any directory. Instead your binary is a memory area that you can access and copy the all bytes from. Thus if for whatever reason you want to read it from file then you need to save the bites to the file and then read them.
If your objective is to deal with the data as a stream then you can just wrap your bytes into a memory stream. Something like
BTW, you can achieve the same functionality without even touching your msi, thanks to the fact that you are using managed project. Thus you can add your binary to the C# project resources and read them at runtime as with any .NET application.
Adding binaries to MSI and then reading them from msi DB is nothing else but a use case of adding user specified binaries to the resources and reading them at runtime. The binary itself is not deployed thus you cannot possibly read it from any directory. Instead your binary is a memory area that you can access and copy the all bytes from. Thus if for whatever reason you want to read it from file then you need to save the bites to the file and then read them.
If your objective is to deal with the data as a stream then you can just wrap your bytes into a memory stream. Something like
new MemoryStream(byte[] data)
BTW, you can achieve the same functionality without even touching your msi, thanks to the fact that you are using managed project. Thus you can add your binary to the C# project resources and read them at runtime as with any .NET application.