Hi,
Can this be achieved? I want to install the some files based on ini value. I have vbscript it will get the value. Here is the VBSCRIPT
'********To read ini File*****
File = "c:\input.ini"
Section = "COMPASS_INSTALL_MODE"
Item = "SILENT"
TEST = ReadIni(FILE,SECTION,ITEM)
msgbox TEST
Function ReadIni( file, section, item )
ReadIni = ""
Set FileSysObj = CreateObject("Scripting.FileSystemObject")
If FileSysObj.FileExists( file ) Then
Set ini = FileSysObj.OpenTextFile( file, 1, False)
Do While ini.AtEndOfStream = False
line = ini.ReadLine
If line = "[" & section & "]" Then
line = ini.ReadLine
Do While Left( line, 1) <> "["
If InStr( line, item & "=" ) = 1 Then
ReadIni = mid( line, Len( item ) + 2 )
Exit Do
End If
If ini.AtEndOfStream Then Exit Do
line = ini.ReadLine
Loop
Exit Do
End If
Loop
ini.Close
End If
End Function
In this script if the TEST value is Y then the files has to be installed other than Y should not install files. How can this be achieved?