[thelist] (no subject)
Patty McBride
pcnewsguy at yahoo.com
Tue Jun 4 08:49:15 CDT 2002
Hello Folks,
I trying to get my system to execute a perl script on
my server for a client.
I am confused because the code I inherited used to
work on NT 4 but now does not on WIN 2000 Server.
After some discussion with ashok about WSH I reviewed
my tests and got the following to work:
Dim WshShell
Set WshShell = CreateObject("WScript.Shell")
Response.write("WSHshell.CurrentDirectory: " &
WSHshell.CurrentDirectory)
It printed out:
WSHshell.CurrentDirectory: C:\WINNT\system32
So I got an object but what kind of object? I can get
the property CurrentDirectory of the
IWshRuntimeLibrary class WSHshell to tell me the
CurrentDirectory but I have yet to get it to run one
of its methods.
I tried this test as an additional line to the above
.asp script:
WshShell.Run "C:\WINNT\system32\calc.exe"
But it does nothing. No error. No Calculator popping
up as I would asume it would??? I am expecting the
same behavior as I would if I had typed calc from the
command line or in the run field from the start menu.
This doesn't work either:
WshShell.Run "calc"
This used to work on NT 4:
Function extractArticles(strParameters)
Dim WSHshell
set WSHshell=createObject("WScript.Shell")
on error resume next
extractArticles=WSHshell.run ("D:\perl\bin\perl.exe "
& databasePath & "extractArticles.pl " &
strParameters,4,TRUE)
End Function
and stopped when I switched to 2000 Server. Again, no
error, no results either. This perl script extracts
articles from a database to a directory in the server.
It works from the command line...
Cheers,
Phil
__________________________________________________
Do You Yahoo!?
Yahoo! - Official partner of 2002 FIFA World Cup
http://fifaworldcup.yahoo.com
More information about the thelist
mailing list