Het Irv
November 5th, 2007, 08:31 PM
I can't find anywhere online that gives me a good anwser. If anyone knows of a better forums to post this in please tell me.
I am trying to write a Logon Script for my network that will display a HTML file every two hours (for security reasons). What I have so far will only read .txt files.
'Declares varibles
Dim objFSO, objFile, strCharacters
'Open the file
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\test.txt", 1)
'To change the file change the path in the line above
'Read the file
Do Until objFile.AtEndOfStream
strCharacters = strCharacters & objFile.Read(1)
Loop
'Display the file in a message box every 2 hours.
Do
Wscript.Echo strCharacters
WScript.sleep(7200*1000)
'To change the amount of time change the first number in
'the line above to the number of seconds needed.
Loop
I don't know much about programming, most of this code has been copied from other places. Any help you can give will be much apreciatied.
I am trying to write a Logon Script for my network that will display a HTML file every two hours (for security reasons). What I have so far will only read .txt files.
'Declares varibles
Dim objFSO, objFile, strCharacters
'Open the file
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFile = objFSO.OpenTextFile("C:\test.txt", 1)
'To change the file change the path in the line above
'Read the file
Do Until objFile.AtEndOfStream
strCharacters = strCharacters & objFile.Read(1)
Loop
'Display the file in a message box every 2 hours.
Do
Wscript.Echo strCharacters
WScript.sleep(7200*1000)
'To change the amount of time change the first number in
'the line above to the number of seconds needed.
Loop
I don't know much about programming, most of this code has been copied from other places. Any help you can give will be much apreciatied.