Command to run on server with vb.net

N

noone

I'm trying execute a command from vb.net and when I run this I don't get errors just nothing happens
I tried process.start, wsscript object, they both do the same thing.. nothing.
Is there a trick to get this to run on a 2003 server. Is there a setting that I'm missing?
Thanks




Go.bat
dir > files.txt
-------------------------------
<%@ Page aspcompat=true %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.IO" %>
< %@Import Namespace="System.Diagnostics" %>

<%
System.Diagnostics.Process.Start("f:\inetpub\webtools\fiscicp\go.bat")
'shell("f:\inetpub\webtools\fiscicp\go.bat")
DIM strACLCommand
Dim myexec
Dim oScript
'oScript = Server.CreateObject("WSCRIPT.SHELL")
'strACLCommand = "f:\inetpub\webtools\fiscicp\go.bat"
'Call oScript.Run(strACLCommand)

%>
 
N

noone

I think I found what my problem is, I was using Impersonation, and even though it was an admin account it doesn't execute.

I'm trying execute a command from vb.net and when I run this I don't get errors just nothing happens
I tried process.start, wsscript object, they both do the same thing.. nothing.
Is there a trick to get this to run on a 2003 server. Is there a setting that I'm missing?
Thanks




Go.bat
dir > files.txt
-------------------------------
<%@ Page aspcompat=true %>
<%@ import Namespace="System.Data" %>
<%@ import Namespace="System.IO" %>
< %@Import Namespace="System.Diagnostics" %>

<%
System.Diagnostics.Process.Start("f:\inetpub\webtools\fiscicp\go.bat")
'shell("f:\inetpub\webtools\fiscicp\go.bat")
DIM strACLCommand
Dim myexec
Dim oScript
'oScript = Server.CreateObject("WSCRIPT.SHELL")
'strACLCommand = "f:\inetpub\webtools\fiscicp\go.bat"
'Call oScript.Run(strACLCommand)

%>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top