Results 1 to 2 of 2
2007-06-04, 19:14 #1
- Join Date
- Jan 2007
- Thanked 0 Times in 0 Posts
Interesting - schtasks cammand in ASP.NET (ASP.Net)
I am trying to use the wScript object in my ASP.NET page to trigger a scheduled task on a server on the network. I am able to accomplish this locally however, when I publish the page onto the web server I get nothing. Here's what I have so far...
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim wshell As Object
wshell = CreateObject("WScript.Shell")
wshell.run("cmd /c schtasks.exe /run /s server2 /tn AM")
wshell = Nothing
When a user clicks on this button the command schtasks.exe is executed on the web server which triggers the scheduled task on server2. Again, it works fine locally, but when I publish it on the webserver the only thing I see happening on the web server is in the taskmanager the process schtasks.exe is running, but the command is not passing through to server2. I know the cammand works because when I open a command window on the web server and type it in, I can see the execution on server2.
2007-06-04, 19:22 #2
- Join Date
- Mar 2002
- Thanked 28 Times in 28 Posts
Re: Interesting - schtasks cammand in ASP.NET (ASP.Net)
You already posted the same question in <post:=653,775>post 653,775</post:>. Please don't double-post.
This thread is locked to prevent confusion and duplication. Please post all replies in the other thread.