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

Execute Remote script in ASP

Status
Not open for further replies.

EdRev

Programmer
Aug 29, 2000
510
0
0
US
I do not know what security settings/permissions have changed, but I am now unable to execute a remote script.
We have two web servers, Serv1 and Serv2. I used to be able to remotely execute a script in Serv1 from Serv2 thru asp.
This is the script.

Set WshShell = Server.CreateObject("WScript.shell")
WshShell.Run "wscript.exe //Serv1/script/somescript.vbs"

For testing, I copied this script in Serv2 and I was able to successfully execute it from Serv2.


I have posted this in MS ASP forum, but I was told to post it somewhere else as the asp page that used to work did not change.

Any help will be greatly appreciated.

 
I am not getting any error at all.
Err.Number = 0.
 
So far these are the scenarios I've tested when I run the page in Serv2:

1. Page executes //Serv2/script/somescript.vbs (local copy) but not //Serv1/script/somescript.vbs (mapped copy in Serv1)
2. The script creates a log file. When I hard-coded the path of the logfile ( C:\logfile\somelogfile.txt) in //Serv2/script/somescript.vbs (local copy), the logfile get created.
But if i use //Serv2/logfile/somelogfile.txt, script hangs and file is not created.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top