Search code examples
c#.netpowershell.net-6.0cyber-ark

APPAP308E - Invalid process path. Full path is required


I use CyberArk 12.1 to get database password by SDK. Application was written in NetCore3.1, we migrate it to NET6. Sadly CA 12.1 isn't compatible with NET6, support appears in 12.6, but my organisation at this moment doesn't plan upgrade

I try to execute PowerShell script from my application (NET6) to connect with CyberArk agent

Script returns from CA error

APPAP308E - Invalid process path. Full path is required

PowerShell

C:\Program Files (x86)\...\CLIPasswordSDK.exe GetPassword /p AppId=xxx /p Query="Safe=xxx;Folder=Root;Object=xxx" /p Reaseon="test"

I don't understand what means path in this context? How can I resolve problem, what could be wrong in my script?


Solution

  • Script is executed in application by creating new process

    Process.Start("script.bat"); // Error about path from CyberArk
    

    There has to be entered absolute path

    Process.Start("c:\\app\\script.bat"); // works