Running a .BAT/.CMD file remotely from Execute Process SSIS task

Enric Vives García 1 Reputation point
2021-01-28T17:35:24.3+00:00

Hi there,

I am trying to run this from this task with these two properties:

Executable: \servername\c$\Program Files (x86)\Common Files\xxx\Batch\Monthly_Total.cmd
Working directory:\servername\c$\Program Files (x86)\Common Files\xxx\Batch\

But it is failing and I getting this message:

'path.....

CMD.EXE was started with the above path as the current directory.
UNC paths are not supported. Defaulting to Windows directory

The user has fully permissions on the remote virtual machine, it is Local Admin

Any thoughts? I remember have used this task in the past successfully against a remote server

Thanks in advance,

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
12,914 questions
Remote Desktop
Remote Desktop
A Microsoft app that connects remotely to computers and to virtual apps and desktops.
4,303 questions
0 comments No comments
{count} votes

3 answers

Sort by: Most helpful
  1. Tom Phillips 17,716 Reputation points
    2021-01-28T19:31:16.823+00:00

    The $ shares are only available to Windows local administrators. I HIGHLY recommend against running SQL Server or SSIS as an administrator.

    You need to create an actual user share and grant the SSIS service/agent rights to the share.

    1 person found this answer helpful.
    0 comments No comments

  2. Williams, Jeffrey A 481 Reputation points
    2021-01-28T21:36:07.477+00:00

    What is the batch command file doing? Is it something that could be done using a script task? If not - and the cmd file must be executed as is - you could use Process.Start in a script task to execute.


  3. Jenny Yan-MSFT 9,326 Reputation points
    2021-01-29T07:47:42.177+00:00

    Hi,
    Kindly check the explanation from below and they also shared the workaround of "pushd \myserver\myshare".

    UNC Paths are supported in cmd.exe. You can copy files to and from them, and map drives to them. You just cannot cd to them and a UNC path cannot be the current directrory.
    https://github.com/cmderdev/cmder/issues/1315


    Hope this helps and please help to accept as Answer if the response is useful.

    Thanks,
    Jenny

    0 comments No comments