ASP and Reading network drive information?

jzimmerman56301

New member
SO.. I have a vbscript that runs on 5 seperate computers on my network. These 5 pcs also have input and output files. I have another script stored on my webserver that when run locally, works perfectly.

dim ipaddress(6)
ipaddress(1) = "192.168.0.139"
ipaddress(2) = "192.168.0.150"
ipaddress(3) = "192.168.0.151"
ipaddress(4) = "192.168.0.152"
ipaddress(5) = "192.168.0.153"
for k = 1 to 5
strInFile = "\" & ipaddress(k) & "\C$\test.txt"
strOutFile ="\" & ipaddress(k) & "\C$\i\attdsl\" & replace(ipaddress(k),".","") & ".txt"
set objFSO = CreateObject("Scripting.FileSystemObject")
set objFile = objFso.OpenTextFile(strOutFile, 1)
strText = objFile.readall
arrLines = Split(strText, vbCrLf)
inText = arrLines(ubound(arrLines) -1)
objFile.close
set arrLines = nothing
strText = ""
set objFile = objFso.OpenTextFile(strInfile, 1)
strText = objFile.Readall
arrlines = split(strText, vbCrLf)
objFile.close

for i = 0 to Ubound(arrLines) - 1

if left(intext,10) = arrlines(i) then
Set objFSO = CreateObject("Scripting.FileSystemObject")
set objFile = objFSO.GetFile(outFile)
wscript.echo(strOutFile & " File Modified: " & objFile.DateLastModified & " :: On Record " & i & " of " & Ubound(arrLines) -1)


exit for
end if
next

next

However, when I plug this code into an asp page and tell the script to write to a webpage instead of a messagebox, i get "permission denied"
on the line that opens the first file. Basically what this script does is checks the output file against the input file and figures out what point the script is at... anyway, where and what permissions do i have to set on the pcs that run these scripts to have ASP be able to open a file for reading? The 5 computers have nothing but windows 2000 and these scripts running, so I'm not really worried about security.
 
Back
Top