- Access exclusive content
- Connect with peers
- Share your expertise
- Find support resources
Our community just got stronger! Explore new identity security resources, connect with experts, and discover more ways to learn and collaborate.
04-27-2022 03:16 PM
Is it possible to run the autoit3 test of an au3 script in Powershell instead of command prompt?"The reason I am doing this is cmd.exe is blocked (group policy) and I am testing using powershell (runas) as a shadow user to test the script....
I am using following command string but get an error "PSMGenericClientWrapper error: Failed to load DLL .\PSMGenericClientDriver.dll"
Command is:
& 'C:\Program Files (x86)\AutoIt3\AutoIt3.exe' .\testscript.au3 .\ /test
Running this as a domain account gets the same result
Running the command in cmd.exe as a valid domain account works
'C:\Program Files (x86)\AutoIt3\AutoIt3.exe' .\testscript.au3 .\ /test
04-28-2022 12:34 AM
Hello @Michael Driscoll,
Not really your expected answer as I have never used command-line to test the script but I'll share my trick anyway.
I use the SciTE editor that comes with AutoIt to develop and test at the same time. BTW, there is a second installer, aside from AutoIt, that greatly expands capabilities of SciTE for AutoIt development. But you don't need it for the next paragraph, it is just to spread the word and make things easier for people who tackle plugin development 🙂
Under the View menu you'll find "Parameters Shift+F8" that allows you to specify the Components full path as well as the /test to let the script run. Then, a simple press of F5 (or menu Tools > Go) will launch the script. The only caveat is that it does not run as a shadow user, so you might encounter permission issues when testing through PSM afterwards, but usually that's the only thing that can go wrong after development and successful /test run through the editor/CLI. So I only have to run once or twice "through PSM" to make sure everything works.
Note that this trick can work with any other IDE and that development of PSM scripts shall not happen on your production PSM servers: as security best practice, it is recommended to "Compile" your AutoIt scripts from your development platform (workstation or pre-prod PSM) and only whitelist the .exe of your plugins in AppLocker to let them run on production servers (and never ever whitelist AutoIt3.exe). See note from this bulletin for more.
04-28-2022 03:48 PM
Thanks
Maybe not the expected answer but still a good and useful reply thanks.
04-29-2022 04:19 AM
I don't think PowerShell is your issue - I'm guessing you will get the exact same error if you manage to run AutoIt from cmd, or open and run the script in the SciTE Editor.
I had a similar issue... since a few weeks ago, AutoIt scripts would execute fine on the PSM itself, but not on my client machine (also with "PSMGenericClientWrapper error: Failed to load DLL .\PSMGenericClientDriver.dll" error message). For me, the solution was to take the file "calibeay32102u-2013.dll" from the PSM's Components folder and place it in the directory where the AutoIt script and PSMGenericClientDriver.dll reside.
My guess is that another application on my client machine previously had the calibeay32102u-2013.dll in its application directory, and since that application directory was in the PATH, the calibeay32102u-2013.dll which is probably an indirect dependency of PSMGenericClientDriver.dll, could be loaded from there. Now that other application was updated to no longer use that specific 32-bit OpenSSL v1.0.2u library, and so PSMGenericClientDriver.dll can't find that dependency unless you specifically put it in the same directory.
Click Accept as Solution to acknowledge that the answer to your question has been provided.
The button appears next to the replies on topics you’ve started. The member who gave the solution and all future visitors to this topic will appreciate it!
These simple actions take just seconds of your time, but go a long way in showing appreciation for community members and the LIVEcommunity as a whole!
The LIVEcommunity thanks you for your participation!

