Nothing in Qt I am aware of. You might be able to do something with low level Windows Api calls, but you will most likely fall foul of data execution prevention.. Why not just write the code to a QTemporaryFile?