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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code runs on ASP page but fails in vbs scheduled task

Status
Not open for further replies.

Spork52

Programmer
Nov 20, 2007
134
US
I have some code which sends out emails. It runs fine if I put it in an ASP page and then browse to that page. But, when I put the code in a vbs file and try running it as a scheduled task, it generates this error:

Microsoft VBScript runtime error: Object required: 'Server'

The line generating the error is:
Code:
set fso = Server.CreateObject("Scripting.FileSystemObject")
which I use later to read a text file from the server.

Why won't this work?
 
you're no longer in IIS so there is no server.

remove the server.

[thumbsup2]DreX
aKa - Robert
if all else fails, light it on fire and do the happy dance!
" I always think outside the 'box', because I'm never in the 'loop' " - DreX 2005
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top