2

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?

Jacek
  • 11,661
  • 23
  • 69
  • 123
  • 1
    `C:\Program Files (x86)\...\CLIPasswordSDK.exe` contains a space; should be enclosed in (double or single) quotation marks (and [dot-sourced or `&` invoked](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_operators)), see [about_Quoting_Rules](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_quoting_rules). Please [edit] your question to improve your [mcve]. – JosefZ Jan 05 '23 at 11:17

1 Answers1

1

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
Jacek
  • 11,661
  • 23
  • 69
  • 123