Skip to main content
3 of 3
improved formatting
mustaccio
  • 26.9k
  • 24
  • 58
  • 74

sqlagent job - using system folder path with CmdExec

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?

g1ga
  • 171
  • 1
  • 5