script problem

F

Freeserve

I am trying to write to a file using:

<%

Sub OpenTextFileTest

Const ForReading = 1, ForWriting = 2, ForAppending = 8

Dim fso, f

Set fso = CreateObject("Scripting.FileSystemObject")

Set f = fso_OpenTextFile("c:\inetpub\rako\commands.txt", ForAppending, True)

f.Write "Hello world!"

f.Close

End Sub

%>



When i call this the script hangs. If I try page refresh, I get "The
requested resource is in use". I have to kill the dllhost.exe process to
free things up.

Any ideas why this won't work?
 
S

Stuart Palmer

Sounds like classic script blocking problem, I am guessing you have norton
antivirus on your machine? Go into NAV and locate script
blocking.....disable it and then things should start working.

Something to do with script block and the FSO.

Good luck

Stu
 
F

Freeserve

Yes. That fixed it. Thanks.

Stuart Palmer said:
Sounds like classic script blocking problem, I am guessing you have norton
antivirus on your machine? Go into NAV and locate script
blocking.....disable it and then things should start working.

Something to do with script block and the FSO.

Good luck

Stu
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,540
Members
45,025
Latest member
KetoRushACVFitness

Latest Threads

Top