Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 calling exe using xp_cmdshell.

Author  Topic 

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2007-11-29 : 09:59:24
I have is a .exe file developed on vb.net. I'm able to run it on QA as exec master..xp_cmdshell 'D:\maxCustom\MX_SyncAddressBook.exe, then if I run it using a SQL job it shows the error:
Executed as user: CAPER\SQLAdmin. The process could not be created for step 1 of job 0x9E75D06B9FC4474EB7503A1CCA0F9AAF (reason: The system cannot find the file specified). The step failed.
Anyone familiary with sql jobs calling .exe file developed on vb.net. Your help would be appreaciated.




http://www.sqlserverstudy.com

TG
Master Smack Fu Yak Hacker

6065 Posts

Posted - 2007-11-29 : 10:13:25
not a good idea. depending on what system account xm_cmdshell will run under notepad may or may not launch. But if it does it will surely be in a different context than the account you are connected as. You have probably started a process on the sql server machine that you can't control (or see). xp_cmdshell should not be used to launch interactive windows applications.

Be One with the Optimizer
TG
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2007-11-29 : 10:17:52
I tried launching a VB.NET executable. But I got output as null.




http://www.sqlserverstudy.com
Go to Top of Page

spirit1
Cybernetic Yak Master

11752 Posts

Posted - 2007-11-29 : 10:33:56
define output.

_______________________________________________
Causing trouble since 1980
blog: http://weblogs.sqlteam.com/mladenp
SSMS Add-in that does a few things: www.ssmstoolspack.com
Go to Top of Page

KenW
Constraint Violating Yak Guru

391 Posts

Posted - 2007-11-29 : 15:41:26
quote:
Originally posted by funketekun

I tried launching a VB.NET executable. But I got output as null.




With over 300 posts here, you should be experienced enough to know that the information you've provided is worthless in getting your question answered.

Post with enough information and someone might be able to help you. Post nothing useful, as you have here, and you'll get nothing useful in return.

Care to try again, providing info this time?
Go to Top of Page

jezemine
Master Smack Fu Yak Hacker

2886 Posts

Posted - 2007-11-30 : 21:42:56
quote:
Originally posted by KenW

With over 300 posts here, you should be experienced enough to know that the information you've provided is worthless in getting your question answered.



Ken, have you read any of those 300 posts? if so then you shouldn't be too surprised. ;)


elsasoft.org
Go to Top of Page

funketekun
Constraint Violating Yak Guru

491 Posts

Posted - 2007-12-02 : 21:13:32
any ideas?





http://www.sqlserverstudy.com
Go to Top of Page

khtan
In (Som, Ni, Yak)

17689 Posts

Posted - 2007-12-02 : 21:21:54
quote:
Originally posted by funketekun

any ideas?

http://www.sqlserverstudy.com




quote:
Originally posted by spirit1

define output.




KH
[spoiler]Time is always against us[/spoiler]

Go to Top of Page
   

- Advertisement -