Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creation of Text Files

Status
Not open for further replies.

nevets2001uk

IS-IT--Management
Jun 26, 2002
609
GB
I've written some vbscript to create a text file on a network drive which will act as a basic counter, storing the dates pages have been visited on and even the username of the person who viewed the page.

It has worked fine on my Windows 2000 machine, creating a text file with all the relevant information. However when I copy the HTM files to a network drive to allow access from other machines the code no longer works.

I would imagine it is because it is no longer able to run the script in the same way as it is not a workstation. I removed the code for getting the username as I could see why this would not work correctly from the servers network drive but the rest of the code should work - shouldn't it?!

The message I get when trying to run the code is...
Active X componant can't create object: 'Scripting.FileSystemObject'
Code 0

Is there any way to get vbscript to create a text file on a network drive without this error?
 
The browser will not let you create a file. This would be a security violation.

Cornboy88
[noevil]
 
unless you use ASP and the web server has the appropriate permissions set up for the IUSR account. Would you be able to set up your current web server to run ASP?? Tony
reddot.gif WIDTH=300 HEIGHT=2 VSPACE=3

 
At the moment we have no web server just a network drive which everyone has rigths to view. A proper server is being looked into for the near future.

For the time being I has just managed to create a basic workaround of the problem. On all machines needing to view the intranet I have set the Drive and folder to be a Trusted site. I took the security settings right down for the trusted sites and it now allows me to create the file after an activeX prompt from the browser. The text file is update correctly on the network and I have been able to use it as a link table in access to store the information more easily.

Thanks for all your comments
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top