Why does VBS not read this text file correctly?
<p>I have the following code to read a text file:</p>

<pre><code>Option Explicit 
Dim InputFile 
Dim FSO, oFile 
Dim strData 

InputFile = "C:\Program Files (x86)\AVG\CloudCare\ClientVersion.txt" 
Set FSO = CreateObject("Scripting.FileSystemObject") 
Set oFile = FSO.OpenTextFile(InputFile) 
strData = oFile.ReadAll 
oFile.Close 
msgbox strData 
</code></pre>

<p>The contents of ClientVersion.txt is:</p>

<pre class="lang-none prettyprint-override"><code>CLIENT_VERSION_STRING   _T("3.5.2") //
</code></pre>

<p>When I run the VBS code, I get back this:</p>

<p><a href="https://i.stack.imgur.com/EpMEo.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/EpMEo.jpg" alt="VBS txt file read"></a></p>

<p>If I create a new text file with the same content in the same location, it works fine. Is there a reason why VBS is unable to read this simple text file? I couldn't see any issues with permissions on the file. </p>