I have a custom EXE written in C# (I didn't write it). It retrieves data from MongoDB and writes six CSV files to the same folder that it resides in.
I can double-click on the EXE and run it -- I do need to run it as an administrator. I have its administrator privileges set in the properties, so it always runs as administrator. It pops up a window with some status messages, then closes without prompting after creating the files.
I have the same EXE listed in an "Execute Process" task in SSIS (VS 2015, pointed to SQL Server 2012). When I run it, it pops up the same cmd window, gives the same status messages, closes without prompting, and continues to the next step in my SSIS package... BUT it doesn't write any files.
I gave "Everyone" permissions to the target folder, which doesn't seem to have helped. What do I need to do?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
When the process is launched from SSIS, it's not being run from the same folder as the executable. That's pretty typically of any software executing an external process.
Fortunately, you can set the "working folder" option within the Execute Process task properties. If your executable is written to write to the current folder, it should work.