Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Run Application with Command Arguments from xp_cmdshell

Status
Not open for further replies.

HyperRon

Programmer
Aug 5, 2003
21
US
I'm trying to run an application using xp_cmdshell that takes an input parameter.. looks like this:

"myapp.exe 32" where 32 is the id of some record in a table. meaning that i only want the program to process one record.

when i run myapp.exe without the parameter it runs through every record.

The app works fine when i use xp_cmdshell without the parameter but, doesn't do squat with it (it works when running the app through command prompt though). In both instances the app will show in the Task manager under the processes tab. So, I know the sp is actually kicking the application off. It just won't do anything when the "myapp.exe 32" is passed xp_cmdshell.

Any Ideas of what would cause this to happen? I'm not sure if it's an SQL problem or Windows 2000.
 
there should be no reason why it wouldn't work. Try sticking "myaspp.exe 32" into a batch file, and try running the batch file from both the command line and with xp_cmdshell

see what you get.

Cheyney
 
That works for some odd reason. Thanks for the work around. It'll buy me some time at least :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top