Tech Support Forum banner
Status
Not open for further replies.
1 - 2 of 2 Posts

·
Registered
Joined
·
1 Posts
Discussion Starter · #1 ·
Hi,
I have a ".vbs" file.

The contents of this file are

Set oISM = CreateObject("SAAuto12.ISWiProject")
oISM.OpenProject "C:\Trunk\Installer\VOIP Client.ism"

oISM.ProductVersion = "1.0.0"
'oISM.PackageCode = oISM.GenerateGUID()
'oISM.ProductCode = oISM.GenerateGUID()

oISM.SaveProject
oISM.CloseProject

Set oISM = Nothing

In this the Product Version in this script has to be taken by text file ".txt" the contents of which are are

1.0.0

How do I take it from the text file?

Thanks,
Sahana
 

·
Registered
Joined
·
2,276 Posts
Hey Sahana,

So it creates a text file with the contents 1.0.0... is that all thats in the text file?

I have limited knowledge of vbscript so excuse me if i go wrong anywhere... I think this is the sort of thing you need to do:

Code:
dim fso, fileToGet, myfileStream, textToRead
set fso = CreateObject ("Scripting.FileSystemObject")
set fileToGet = fso.GetFile("c:\[b]<the file path etc>[/b]")
set myFilestream = fileToGet.OpenAsTextStream (1)
set textToRead = myFileStream.readAll;
myFileStream.Close
textToRead will then hold the entire contents of the txt file, if you only want a bit of it then use the read function(google it)

Cheers,
Jamey
 
1 - 2 of 2 Posts
Status
Not open for further replies.
Top