scripting:api:wsh-text-stream:read-all

ReadAll

Method of IWshTextStream

Reads an entire TextStream file and returns the resulting string

var Text = WshTextStream.ReadAll();
Text = WshTextStream.ReadAll
BSTR Text;
HRESULT hr = WshTextStream.ReadAll(&Text);