﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / SQL Server 2008 - General  / CmdExec problem / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Wed, 19 Jun 2013 10:20:48 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: CmdExec problem</title><link>http://www.sqlservercentral.com/Forums/Topic1401905-391-1.aspx</link><description>The PowerShell step type runs commands in a mini-shell called sqlps.exe which is not the same as what you get when you open a PowerShell prompt using powershell.exe so results may vary.You said your program runs at a PowerShell prompt (powershell.exe). Have you tried running it at a standard CmdShell prompt (cmd.exe)?</description><pubDate>Thu, 03 Jan 2013 14:37:22 GMT</pubDate><dc:creator>opc.three</dc:creator></item><item><title>RE: CmdExec problem</title><link>http://www.sqlservercentral.com/Forums/Topic1401905-391-1.aspx</link><description>It runs using PowerShell but when I try to use the PowerShell that is in Sql Server Agent, it does not run.  does anyone know what scipt I should use in PowerShell to run this .exe program?  This is what I have:  C:\myfile\myprogram.exe</description><pubDate>Wed, 02 Jan 2013 12:20:52 GMT</pubDate><dc:creator>maximost1</dc:creator></item><item><title>RE: CmdExec problem</title><link>http://www.sqlservercentral.com/Forums/Topic1401905-391-1.aspx</link><description>Can you set up a Hello World app and run that as a test?  Something simple that just writes a line to a text file or something like that?  Then run that in the step to see what's going on a bit more indirectly.</description><pubDate>Wed, 02 Jan 2013 09:21:22 GMT</pubDate><dc:creator>GSquared</dc:creator></item><item><title>CmdExec problem</title><link>http://www.sqlservercentral.com/Forums/Topic1401905-391-1.aspx</link><description>I have a job that has 4 steps.  The first step runs the SSIS pkg.  The second step calls a program after completing step one.  I use the Operating System (CmdExec) in the step to call the program and run as a SQL Server Agent Service Account.  Then the path to the .exe is in the command section.  c:\MyProgramFile\MyProgram.exe with the process exit code as 0.   I am not sure the program is running when it is called because the job immediately goes to the next step which is another program which does not appear to run either (the second program is set up the same way in its step).  The job's next step is an SSIS pkg which runs fine.   My question.  How do I make sure step 2 runs before the job goes to step 3?    And how do I make sure it is running at all.  The history log says it completed but I do not see the document should create.</description><pubDate>Wed, 02 Jan 2013 09:13:43 GMT</pubDate><dc:creator>maximost1</dc:creator></item></channel></rss>