Skip to main content
Tweeted twitter.com/StackDBAs/status/1168176811408265217
improved formatting
Source Link
mustaccio
  • 26.9k
  • 24
  • 58
  • 74

I'm trying to setup a SQL Server agent job of type CmdExec for running an executable inside %programdata%\my company folder.

If I use %programdata%\my company\myexec.exe, the job fails with error:because it apparently can't find the file.

it can't find the file.

But it works with the absolute path as follows:

C:\ProgramData\my company\myexec.exe

Anybody knows a way toHow can I run the job successfully using the special folder alias?

I'm trying to setup a SQL Server agent job of type CmdExec for running an executable inside %programdata%\my company folder.

If I use %programdata%\my company\myexec.exe, the job fails with error:

it can't find the file.

But it works with the absolute path as follows:

C:\ProgramData\my company\myexec.exe

Anybody knows a way to run the job successfully using the special folder alias?

I'm trying to setup a SQL Server agent job of type CmdExec for running an executable inside %programdata%\my company folder.

If I use %programdata%\my company\myexec.exe, the job fails because it apparently can't find the file.

But it works with the absolute path:

C:\ProgramData\my company\myexec.exe

How can I run the job successfully using the special folder alias?

I'm trying to setup a sqlserverSQL Server agent job of type CmdExecCmdExec for running an executable inside %programdata%\my company folder%programdata%\my company folder. But if

If I use %programdata%\my company\myexec.exe%programdata%\my company\myexec.exe, the job fails to start because it sayswith error:

it can't find the file.

But it can't find the file. Withworks with the absolute path Cas follows:\ProgramData\my company\myexec.exe it works.

C:\ProgramData\my company\myexec.exe

Anybody knows a way to run the job successfully using the special folder alias?

I'm trying to setup a sqlserver agent job of type CmdExec for running an executable inside %programdata%\my company folder. But if I use %programdata%\my company\myexec.exe, the job fails to start because it says it can't find the file. With the absolute path C:\ProgramData\my company\myexec.exe it works. Anybody knows a way to run the job successfully using the special folder alias?

I'm trying to setup a SQL Server agent job of type CmdExec for running an executable inside %programdata%\my company folder.

If I use %programdata%\my company\myexec.exe, the job fails with error:

it can't find the file.

But it works with the absolute path as follows:

C:\ProgramData\my company\myexec.exe

Anybody knows a way to run the job successfully using the special folder alias?

Post Migrated Here from stackoverflow.com (revisions)
Source Link
g1ga
  • 171
  • 1
  • 5

sqlagent job - using system folder path with CmdExec

I'm trying to setup a sqlserver agent job of type CmdExec for running an executable inside %programdata%\my company folder. But if I use %programdata%\my company\myexec.exe, the job fails to start because it says it can't find the file. With the absolute path C:\ProgramData\my company\myexec.exe it works. Anybody knows a way to run the job successfully using the special folder alias?