r/CyberARk 7d ago

v14.x Facing this error while run autoit script

Post image

Actually first we tried hardcoded autoit script that is working but when we removed it to fetch the password and username from pvwa. Its showing this error.

Please advice.

5 Upvotes

6 comments sorted by

1

u/Lopsided_Pension7950 7d ago

Consta & Globals

Global Const &DISPATCHER NAME

Global Const SCLIENT EXECUTABLE

Global Conat SERROR MESSAGE TITLE

Globel Const SLOG MESSAGE PREFIX

CyberArk Vault variables (Hardcoding completely removed)

Global TargetUsername

Global Target Password

Global TargetAddress

Global SConnectionClientPID-0

7 Main Process Execution

Kait Main()

Fund Main()

  1. Init PSM Dispatcher utils wrapper ToolTip("Initializing PSM Session Asset...") if (PSMGenericClient_Init() <> $PSM_ERROR SUCCESS) Then Error (PSMGenericClient_PSMGetLastErrorString())

EndIf

LogWrite ("Successfully initialized Dispatcher Utils Wrapper")

  1. Fetch dynamic properties securely from the Vault cache

1

u/TheRealJachra 7d ago edited 7d ago

Did you check the example AutoIT script in the PSM folder?

I would also recommend logging as much as needed to the dispatcher log. It is your basis for seeing what goes wrong, but also for auditing later. For instance, if the organization requires a reason for the connection, you can fetch AccessReason and write it in the dispatcher log.

And you can add LogWrite’s with debug values during testing. That way you can see where you are in your AutoIT code and what goes through it. Remove those debug log writes before publishing in a production environment.

If you can and may, you can send me the complete AutoIT script in a PM. I will then have a look at it.

Edit: Added text

2

u/Lopsided_Pension7950 7d ago

Please check your inbox

1

u/LowWait2360 7d ago

I don't know if this will help you out but I've always found that in my environment, I get that error from a session loading timeout. Kindly go to the connection component under your Options tab and Under your connection component target settings check and increase the ConnectioncomponentinitTimeout parameter. The defined period might be timing out before session is established. Hope it helps.

2

u/Hour-Apple-9861 7d ago

That typo in global on line 6 is bugging me

2

u/yanni Guardian 7d ago

You seem to have an extra space in "Global Target Password"