This is a great solution and works for me when run through BIDS or SSIS on the server from MSDB. When I run it as a SQL Server Agent job as CmdExec or SQL Server Integration Services Package for the job step type, I get the following error when the program to password protect an Excel task/file is run:
Error: 2011-07-12 11:35:15.58
Source: Password Protect Excel File Execute Process Task
Description: In Executing "\\myServer\e$\DBA\Programs\ExcelPasswordProtect\PasswordProtectExcel.exe " "0 "\\myServer\e$\DBA\Data Pulls\file.xlsx" 1234511" at "\\myServer\e$\DBA\Programs\ExcelPasswordProtect", The process exit code was "-1073741819" while the expected was "0".
I've looked all over and tried numerous things regarding the exit code error of "-1073741819", but haven't found a solution. I've really opened up permissions on the server. Used a proxy, tried local system, tried my domain account (admin group).
Windows 2008 R2 Enterprise
SQL Server 2008 R2 Enterprise
Any help or more questions to stimulate ideas would be most appreciated!