Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: Applications on a server


Message #1 by "Simon Garstin" <sales@o...> on Wed, 25 Jul 2001 10:27:46 +0100
Hi All,



is there any way to cause a process to run on a web server without using an

exe file and without opening up an asp file ?



To give an example - suppose you have a paid subscription system and you

want to allow users to register (at which point the asp registration code

adds his username and password to a user database) and then try out the

system for 30 days for free. Then on (or after) the 30th day you want the

system to ask the user for payment - if he refuses the asp code will then

delete the user from the database.



This works fine UNLESS of course the user tries is out for say 10 days and

then NEVER VISITS THE SITE AGAIN. Because the asp page is never accessed

again the system will never get a chance to delete his record from the

database (unless an external administrator does so). Is there any way to

delete the record automatically via asp or some other process ?

What about WSH ?





thanks in advance





Simon Garstin



Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 25 Jul 2001 12:19:47 +0100
Yes, you've hit the nail on the head - use WSH



Write your vbscript code as you would an ASP, leave out the HTML and 

<%%>

tags, its just the vbscript you want.  Don't use the ASP object model

(response, request etc), and use CreateObject instead of

Server.CreateObject.  Save the file with the extension vbs.  Now you 

can

double click the file on the server and the script will be executed.  

You

can execute it from the command line with



cscript.exe "C:\path\script.vbs"



use the AT command if you want to schedule it to run every night, or 

every

weekend or whatever (just type AT at the command line for help)



-----Original Message-----

From: Simon Garstin [mailto:sales@o...]

Sent: 25 July 2001 10:28

To: ASP Web HowTo

Subject: [asp_web_howto] Applications on a server





Hi All,



is there any way to cause a process to run on a web server without 

using an

exe file and without opening up an asp file ?



To give an example - suppose you have a paid subscription system and 

you

want to allow users to register (at which point the asp registration 

code

adds his username and password to a user database) and then try out the

system for 30 days for free. Then on (or after) the 30th day you want 

the

system to ask the user for payment - if he refuses the asp code will 

then

delete the user from the database.



This works fine UNLESS of course the user tries is out for say 10 days 

and

then NEVER VISITS THE SITE AGAIN. Because the asp page is never 

accessed

again the system will never get a chance to delete his record from the

database (unless an external administrator does so). Is there any way 

to

delete the record automatically via asp or some other process ?

What about WSH ?





thanks in advance





Simon Garstin





Message #3 by "Simon Garstin" <sales@o...> on Wed, 25 Jul 2001 14:19:55 +0100
Cheers for the info, Alex.



What I want is for it to run without anyone doing anything (eg. nightly) -

using the AT command will achieve this will it?

Also, I don't run my own web server, I rent space off someone else.

What I want to do is design it, test it (don't laugh I'm using Win 98) and

upload the WSH file to the server.

Can I do all this ?



regards



SG



----- Original Message -----

From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>

To: ASP Web HowTo <asp_web_howto@p...>

Sent: Wednesday, July 25, 2001 12:19 PM

Subject: [asp_web_howto] RE: Applications on a server





Yes, you've hit the nail on the head - use WSH



Write your vbscript code as you would an ASP, leave out the HTML and <%%>

tags, its just the vbscript you want.  Don't use the ASP object model

(response, request etc), and use CreateObject instead of

Server.CreateObject.  Save the file with the extension vbs.  Now you can

double click the file on the server and the script will be executed.  You

can execute it from the command line with



cscript.exe "C:\path\script.vbs"



use the AT command if you want to schedule it to run every night, or every

weekend or whatever (just type AT at the command line for help)



-----Original Message-----

From: Simon Garstin [mailto:sales@o...]

Sent: 25 July 2001 10:28

To: ASP Web HowTo

Subject: [asp_web_howto] Applications on a server





Hi All,



is there any way to cause a process to run on a web server without using an

exe file and without opening up an asp file ?



To give an example - suppose you have a paid subscription system and you

want to allow users to register (at which point the asp registration code

adds his username and password to a user database) and then try out the

system for 30 days for free. Then on (or after) the 30th day you want the

system to ask the user for payment - if he refuses the asp code will then

delete the user from the database.



This works fine UNLESS of course the user tries is out for say 10 days and

then NEVER VISITS THE SITE AGAIN. Because the asp page is never accessed

again the system will never get a chance to delete his record from the

database (unless an external administrator does so). Is there any way to

delete the record automatically via asp or some other process ?

What about WSH ?





thanks in advance





Simon Garstin

Message #4 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Wed, 25 Jul 2001 14:39:43 +0100
Yes, whatever you write on your win98 machine will work on the server 

too.

If your ISP is unwilling to do the scheduling, you can write another

vbscript that schedules it.



-----Original Message-----

From: Simon Garstin [mailto:sales@o...]

Sent: 25 July 2001 14:20

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Applications on a server





Cheers for the info, Alex.



What I want is for it to run without anyone doing anything (eg. 

nightly) -

using the AT command will achieve this will it?

Also, I don't run my own web server, I rent space off someone else.

What I want to do is design it, test it (don't laugh I'm using Win 98) 

and

upload the WSH file to the server.

Can I do all this ?



regards



SG



----- Original Message -----

From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>

To: ASP Web HowTo <asp_web_howto@p...>

Sent: Wednesday, July 25, 2001 12:19 PM

Subject: [asp_web_howto] RE: Applications on a server





Yes, you've hit the nail on the head - use WSH



Write your vbscript code as you would an ASP, leave out the HTML and 

<%%>

tags, its just the vbscript you want.  Don't use the ASP object model

(response, request etc), and use CreateObject instead of

Server.CreateObject.  Save the file with the extension vbs.  Now you 

can

double click the file on the server and the script will be executed.  

You

can execute it from the command line with



cscript.exe "C:\path\script.vbs"



use the AT command if you want to schedule it to run every night, or 

every

weekend or whatever (just type AT at the command line for help)



-----Original Message-----

From: Simon Garstin [mailto:sales@o...]

Sent: 25 July 2001 10:28

To: ASP Web HowTo

Subject: [asp_web_howto] Applications on a server





Hi All,



is there any way to cause a process to run on a web server without 

using an

exe file and without opening up an asp file ?



To give an example - suppose you have a paid subscription system and 

you

want to allow users to register (at which point the asp registration 

code

adds his username and password to a user database) and then try out the

system for 30 days for free. Then on (or after) the 30th day you want 

the

system to ask the user for payment - if he refuses the asp code will 

then

delete the user from the database.



This works fine UNLESS of course the user tries is out for say 10 days 

and

then NEVER VISITS THE SITE AGAIN. Because the asp page is never 

accessed

again the system will never get a chance to delete his record from the

database (unless an external administrator does so). Is there any way 

to

delete the record automatically via asp or some other process ?

What about WSH ?





thanks in advance





Simon Garstin



---

Message #5 by "Simon Garstin" <sgarstin@t...> on Thu, 26 Jul 2001 10:10:06 +0100
To all the gurus,



I just wanted to check again before I dive into WSH... is it be possible to

write a WSH script which runs automatically without anyone needing to

double-click on the file (eg. it runs on it's own once every 24 hours) ?

.... or would it require the server administrator to do something ?



Or both ?!





cheers once again



Simon Garstin



----- Original Message -----

From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>

To: ASP Web HowTo <asp_web_howto@p...>

Sent: Wednesday, July 25, 2001 2:39 PM

Subject: [asp_web_howto] RE: Applications on a server





Yes, whatever you write on your win98 machine will work on the server too.

If your ISP is unwilling to do the scheduling, you can write another

vbscript that schedules it.



-----Original Message-----

From: Simon Garstin [mailto:sales@o...]

Sent: 25 July 2001 14:20

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Applications on a server





Cheers for the info, Alex.



What I want is for it to run without anyone doing anything (eg. nightly) -

using the AT command will achieve this will it?

Also, I don't run my own web server, I rent space off someone else.

What I want to do is design it, test it (don't laugh I'm using Win 98) and

upload the WSH file to the server.

Can I do all this ?



regards



SG



----- Original Message -----

From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>

To: ASP Web HowTo <asp_web_howto@p...>

Sent: Wednesday, July 25, 2001 12:19 PM

Subject: [asp_web_howto] RE: Applications on a server





Yes, you've hit the nail on the head - use WSH



Write your vbscript code as you would an ASP, leave out the HTML and <%%>

tags, its just the vbscript you want.  Don't use the ASP object model

(response, request etc), and use CreateObject instead of

Server.CreateObject.  Save the file with the extension vbs.  Now you can

double click the file on the server and the script will be executed.  You

can execute it from the command line with



cscript.exe "C:\path\script.vbs"



use the AT command if you want to schedule it to run every night, or every

weekend or whatever (just type AT at the command line for help)



-----Original Message-----

From: Simon Garstin [mailto:sales@o...]

Sent: 25 July 2001 10:28

To: ASP Web HowTo

Subject: [asp_web_howto] Applications on a server





Hi All,



is there any way to cause a process to run on a web server without using an

exe file and without opening up an asp file ?



To give an example - suppose you have a paid subscription system and you

want to allow users to register (at which point the asp registration code

adds his username and password to a user database) and then try out the

system for 30 days for free. Then on (or after) the 30th day you want the

system to ask the user for payment - if he refuses the asp code will then

delete the user from the database.



This works fine UNLESS of course the user tries is out for say 10 days and

then NEVER VISITS THE SITE AGAIN. Because the asp page is never accessed

again the system will never get a chance to delete his record from the

database (unless an external administrator does so). Is there any way to

delete the record automatically via asp or some other process ?

What about WSH ?





thanks in advance





Simon Garstin



Message #6 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Thu, 26 Jul 2001 10:27:04 +0100
Yes, you can schedule it to run automatically with the AT command.



The system administrator would need to type the command and parameters 

into

the command prompt.  You could write a batch file that contains the 

command,

and then all the administrator would need to do is run the batch file.



-----Original Message-----

From: Simon Garstin [mailto:sgarstin@t...]

Sent: 26 July 2001 10:10

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Applications on a server





To all the gurus,



I just wanted to check again before I dive into WSH... is it be 

possible to

write a WSH script which runs automatically without anyone needing to

double-click on the file (eg. it runs on it's own once every 24 hours) 

?

.... or would it require the server administrator to do something ?



Or both ?!





cheers once again



Simon Garstin



----- Original Message -----

From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>

To: ASP Web HowTo <asp_web_howto@p...>

Sent: Wednesday, July 25, 2001 2:39 PM

Subject: [asp_web_howto] RE: Applications on a server





Yes, whatever you write on your win98 machine will work on the server 

too.

If your ISP is unwilling to do the scheduling, you can write another

vbscript that schedules it.



-----Original Message-----

From: Simon Garstin [mailto:sales@o...]

Sent: 25 July 2001 14:20

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Applications on a server





Cheers for the info, Alex.



What I want is for it to run without anyone doing anything (eg. 

nightly) -

using the AT command will achieve this will it?

Also, I don't run my own web server, I rent space off someone else.

What I want to do is design it, test it (don't laugh I'm using Win 98) 

and

upload the WSH file to the server.

Can I do all this ?



regards



SG



----- Original Message -----

From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>

To: ASP Web HowTo <asp_web_howto@p...>

Sent: Wednesday, July 25, 2001 12:19 PM

Subject: [asp_web_howto] RE: Applications on a server





Yes, you've hit the nail on the head - use WSH



Write your vbscript code as you would an ASP, leave out the HTML and 

<%%>

tags, its just the vbscript you want.  Don't use the ASP object model

(response, request etc), and use CreateObject instead of

Server.CreateObject.  Save the file with the extension vbs.  Now you 

can

double click the file on the server and the script will be executed.  

You

can execute it from the command line with



cscript.exe "C:\path\script.vbs"



use the AT command if you want to schedule it to run every night, or 

every

weekend or whatever (just type AT at the command line for help)



-----Original Message-----

From: Simon Garstin [mailto:sales@o...]

Sent: 25 July 2001 10:28

To: ASP Web HowTo

Subject: [asp_web_howto] Applications on a server





Hi All,



is there any way to cause a process to run on a web server without 

using an

exe file and without opening up an asp file ?



To give an example - suppose you have a paid subscription system and 

you

want to allow users to register (at which point the asp registration 

code

adds his username and password to a user database) and then try out the

system for 30 days for free. Then on (or after) the 30th day you want 

the

system to ask the user for payment - if he refuses the asp code will 

then

delete the user from the database.



This works fine UNLESS of course the user tries is out for say 10 days 

and

then NEVER VISITS THE SITE AGAIN. Because the asp page is never 

accessed

again the system will never get a chance to delete his record from the

database (unless an external administrator does so). Is there any way 

to

delete the record automatically via asp or some other process ?

What about WSH ?





thanks in advance





Simon Garstin



Message #7 by "Simon Garstin" <sales@o...> on Wed, 25 Jul 2001 15:10:15 +0100
Alex,

Trying to understand you - what do you mean by the ISP being unwilling to do

the scheduling ?

You mean they might not allow WSH to run perhaps - and do you mean by

writing another vbscript that I don't need to write WSH for it to run

automatically ? In otherwords asp would do the job ?



Sorry for the "20 questions"

cheers



SG



----- Original Message -----

From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>

To: ASP Web HowTo <asp_web_howto@p...>

Sent: Wednesday, July 25, 2001 2:39 PM

Subject: [asp_web_howto] RE: Applications on a server





Yes, whatever you write on your win98 machine will work on the server too.

If your ISP is unwilling to do the scheduling, you can write another

vbscript that schedules it.





Message #8 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Fri, 27 Jul 2001 10:18:56 +0100
I just meant if scheduling the file was not a service they offered... 

an ASP

can't be scheduled, its got to be a WSH file.   But what you can do if 

they

don't schedule it for you is write an ASP that invokes the shell object 

and

executes the command to shedule it. 



Heres info about the AT command (which you can get by typing AT /? into 

the

command line).



The AT command schedules commands and programs to run on a computer at

a specified time and date. The Schedule service must be running to use

the AT command.



AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]

AT [\\computername] time [/INTERACTIVE]

    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"



\\computername     Specifies a remote computer. Commands are scheduled 

on

the

                   local computer if this parameter is omitted.

id                 Is an identification number assigned to a scheduled

                   command.

/delete            Cancels a scheduled command. If id is omitted, all 

the

                   scheduled commands on the computer are canceled.

/yes               Used with cancel all jobs command when no further

                   confirmation is desired.

time               Specifies the time when command is to run.

/interactive       Allows the job to interact with the desktop of the 

user

                   who is logged on at the time the job runs.

/every:date[,...]  Runs the command on each specified day(s) of the 

week or

                   month. If date is omitted, the current day of the 

month

                   is assumed.

/next:date[,...]   Runs the specified command on the next occurrence of 

the

                   day (for example, next Thursday).  If date is 

omitted,

the

                   current day of the month is assumed.

"command"          Is the Windows NT command, or batch program to be 

run.



-----Original Message-----

From: Simon Garstin [mailto:sales@o...]

Sent: 25 July 2001 15:10

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Applications on a server





Alex,

Trying to understand you - what do you mean by the ISP being unwilling 

to do

the scheduling ?

You mean they might not allow WSH to run perhaps - and do you mean by

writing another vbscript that I don't need to write WSH for it to run

automatically ? In otherwords asp would do the job ?



Sorry for the "20 questions"

cheers



SG



----- Original Message -----

From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>

To: ASP Web HowTo <asp_web_howto@p...>

Sent: Wednesday, July 25, 2001 2:39 PM

Subject: [asp_web_howto] RE: Applications on a server





Yes, whatever you write on your win98 machine will work on the server 

too.

If your ISP is unwilling to do the scheduling, you can write another

vbscript that schedules it.





Message #9 by "Simon Garstin" <sales@o...> on Fri, 27 Jul 2001 13:05:22 +0100
Alex,



Thanks for taking time out to provide alot of info. I will investigate



cheers



Simon



----- Original Message -----

From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>

To: ASP Web HowTo <asp_web_howto@p...>

Sent: Friday, July 27, 2001 10:18 AM

Subject: [asp_web_howto] RE: Applications on a server





I just meant if scheduling the file was not a service they offered... an ASP

can't be scheduled, its got to be a WSH file.   But what you can do if they

don't schedule it for you is write an ASP that invokes the shell object and

executes the command to shedule it.



Heres info about the AT command (which you can get by typing AT /? into the

command line).



The AT command schedules commands and programs to run on a computer at

a specified time and date. The Schedule service must be running to use

the AT command.



AT [\\computername] [ [id] [/DELETE] | /DELETE [/YES]]

AT [\\computername] time [/INTERACTIVE]

    [ /EVERY:date[,...] | /NEXT:date[,...]] "command"



\\computername     Specifies a remote computer. Commands are scheduled on

the

                   local computer if this parameter is omitted.

id                 Is an identification number assigned to a scheduled

                   command.

/delete            Cancels a scheduled command. If id is omitted, all the

                   scheduled commands on the computer are canceled.

/yes               Used with cancel all jobs command when no further

                   confirmation is desired.

time               Specifies the time when command is to run.

/interactive       Allows the job to interact with the desktop of the user

                   who is logged on at the time the job runs.

/every:date[,...]  Runs the command on each specified day(s) of the week or

                   month. If date is omitted, the current day of the month

                   is assumed.

/next:date[,...]   Runs the specified command on the next occurrence of the

                   day (for example, next Thursday).  If date is omitted,

the

                   current day of the month is assumed.

"command"          Is the Windows NT command, or batch program to be run.



-----Original Message-----

From: Simon Garstin [mailto:sales@o...]

Sent: 25 July 2001 15:10

To: ASP Web HowTo

Subject: [asp_web_howto] RE: Applications on a server





Alex,

Trying to understand you - what do you mean by the ISP being unwilling to do

the scheduling ?

You mean they might not allow WSH to run perhaps - and do you mean by

writing another vbscript that I don't need to write WSH for it to run

automatically ? In otherwords asp would do the job ?



Sorry for the "20 questions"

cheers



SG



----- Original Message -----

From: Alex Shiell, ITS, EC, SE <alex.shiell@s...>

To: ASP Web HowTo <asp_web_howto@p...>

Sent: Wednesday, July 25, 2001 2:39 PM

Subject: [asp_web_howto] RE: Applications on a server





Yes, whatever you write on your win98 machine will work on the server too.

If your ISP is unwilling to do the scheduling, you can write another

vbscript that schedules it.



Message #10 by "Ken Schaefer" <ken@a...> on Sat, 28 Jul 2001 17:13:35 +1000
Any hosting company worth their salt would have removed the at.exe file from

its default location, and ACLed it in any case so that only administrators

could call it (ala the IIS v4 and v5 checklists)



Cheers

Ken



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

----- Original Message -----

From: "Alex Shiell, ITS, EC, SE" <alex.shiell@s...>

To: "ASP Web HowTo" <asp_web_howto@p...>

Sent: Friday, July 27, 2001 7:18 PM

Subject: [asp_web_howto] RE: Applications on a server





I just meant if scheduling the file was not a service they offered... an ASP

can't be scheduled, its got to be a WSH file.   But what you can do if they

don't schedule it for you is write an ASP that invokes the shell object and

executes the command to shedule it.



Heres info about the AT command (which you can get by typing AT /? into the

command line).








  Return to Index