i have developed one solution with three projects using C# and created exe file from it.
if i run exe file by clicking or from command prompt it is working without any trouble.
but if i run It from sqlserver xp_cmdshell passed by the path where my exe file resides
Example
exec master..xp_cmdshell 'D:\Outosms\tester.exe'.
it is not working
4. i have also used the following code to run it inside asp.net/vb.net code
----------------
Dim myProcess As New System.Diagnostics.Process
Dim myInfo As New System.Diagnostics.ProcessStartInfo
myInfo.FileName = Server.MapPath("OutoSMS\Release\Tester.exe")
myInfo.RedirectStandardOutput = True
myInfo.UseShellExecute = False
myProcess.StartInfo.CreateNoWindow = False
myProcess = System.Diagnostics.Process.Start(myInfo)
'myProcess.Start()
myProcess.Close()
-----------
but unforgunately none of both step3 and 4 solutions solved my problem that is why i am requesting urgent help.
you've not stated what it is that your .exe does ...
look at your vb code (you've commented out this line ... why?):
'myProcess.Start()
did you comment out the above line on purpose?
g.
B-) Please help me by completing my school survey about computer programmers on my website. Thank you!!! Gerry Lowry +1 705-429-7550 wasaga beach, ontario, canada
caligeesey
0 Points
3 Posts
Runing Exe file
Jan 01, 2013 03:26 AM|LINK
Example
exec master..xp_cmdshell 'D:\Outosms\tester.exe'.
it is not working
4. i have also used the following code to run it inside asp.net/vb.net code
----------------
Dim myProcess As New System.Diagnostics.Process
Dim myInfo As New System.Diagnostics.ProcessStartInfo
myInfo.FileName = Server.MapPath("OutoSMS\Release\Tester.exe")
myInfo.RedirectStandardOutput = True
myInfo.UseShellExecute = False
myProcess.StartInfo.CreateNoWindow = False
myProcess = System.Diagnostics.Process.Start(myInfo)
'myProcess.Start()
myProcess.Close()
-----------
but unforgunately none of both step3 and 4 solutions solved my problem that is why i am requesting urgent help.
best regards
gerrylowry
All-Star
20513 Points
5712 Posts
Re: Runing Exe file
Jan 01, 2013 04:20 AM|LINK
@ caligeesey welcome to forums.asp.net
you've not stated what it is that your .exe does ...
look at your vb code (you've commented out this line ... why?):
did you comment out the above line on purpose?
g.
santosh.jagd...
Star
7625 Points
1454 Posts
Re: Runing Exe file
Jan 01, 2013 04:23 AM|LINK
please check xp_cmd shell is enabled
http://blog.sqlauthority.com/2007/04/26/sql-server-enable-xp_cmdshell-using-sp_configure/
MCP