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

VB Script: running it from the web

Status
Not open for further replies.

adventureke

Technical User
Jan 11, 2007
2
GB
Hi

I have a .vbs script, which when run, reads other files in the same folder and does a calculation.

I would like to find out how i can run this file from a webserver or a webpage?

Currentl i use the Scheduled Tasks on my machine.

Please help!

Raj
 
Dont know if this will help you out or not but I figured I would post encase it helps someone else.

I too have a vbscript that I needed ran from a webpage. We are using ColdFusion MX7 and I was able to call the vbs file using a cfexecute tag. Here is the tag:

<cfexecute name="C:\Windows\system32\cscript.exe" arguments="C:\Path\To\Script.vbs -c" timeout="30"> </cfexecute>
 
You can run vbscript in an ASP page. it depends on what you want to do of course. You need to be aware of some differences like you can't use Wscript.Quit in an ASP page.

What does your script do? Post your code for more specific advice.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
An hta works much the same as an ASP page. The main difference is that with an HTA you can execute client side.
The problem with an HTA is that it requires the user to save it locally and execute it.

I've created a number of internal tools that use HTA's and would only recommend using them with technically savvy users. You should further be aware that security problems exist running HTAs on Vista. Your users will either need to modify and save the files (so they appear to be from that machine) or take specific actions to allow them to run.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
The VBSCRIPT, is hello.vbs, and all it is going is looking at a file call trail.txt which is in the same folder.

So all i want the vbs to do is run, so that it reads the trail.txt files, and creates a few file with the same information called trail.res

The script runs fine manually. All i want it to do is run it for example from an asp page in its location instead of being saved in a temporary location (beause it will not find the .txt files there. I am not sure how to code this in asp.

Help!
 
thanks for the insight Mark. I am currently learning about them and this info will be handy
 
Adventureke, have you considered pointing to the files via UNC path?

Post your code for addititional help.

MrMovie, one thing I think you will find interesting. One thing I like to do is to add a hyperlink in the HTA that when clicked runs a function that builds a new web page in IE, I use this to add help files to my HTAs. It is really quite cool.

I hope you find this post helpful.

Regards,

Mark

Check out my scripting solutions at
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top