How to pass input parameters for Passolo Batch Mode /runmacro command?

What would be the best way to pass parameters into a macro execution call from the Batch Mode command /runmacro?

  • Just add the parameters you need to the SDL Passolo command line call and use the Windows API to retrieve and analyze the command line when the macro starts.

    Private Declare Function GetCommandLine Lib "kernel32.dll" Alias "GetCommandLineA" () As String
    Sub Main
       Dim cmdLine As String
       cmdLine = GetCommandLine()
       MsgBox cmdLine
    End Sub

  • Hello Achim,

    Thank you for the reply. I have tried it and get an exception:

    -----------------------------------
    Problem signature:
    Problem Event Name: APPCRASH
    Application Name: psl.exe
    Application Version: 16.0.309.0
    Application Timestamp: 583c01c5
    Fault Module Name: KERNELBASE.dll
    Fault Module Version: 6.1.7601.23569
    Fault Module Timestamp: 57f7bc1f
    Exception Code: c0000005
    Exception Offset: 00030ac4
    OS Version: 6.1.7601.2.1.0.256.48
    Locale ID: 1033
    Additional Information 1: 0a9e
    Additional Information 2: 0a9e372d3b4ad19135b953a78882e789
    Additional Information 3: 0a9e
    Additional Information 4: 0a9e372d3b4ad19135b953a78882e789

    Read our privacy statement online:
    go.microsoft.com/.../

    If the online privacy statement is not available, please read our privacy statement offline:
    C:\Windows\system32\en-US\erofflps.txt
    -----------------------------------

    I have tried even to execute it as administrator to exclude possible access right violation, but the result is the same.

  • I have tested and provided this solution some years ago in the old Passolo forum and the client confirmed that this is working very well. As this is a user specific customization our support department is not able to help. Maybe you can contact sales so that you will be able to get help from Professional Services.
  • The functional call seems to have been slightly changed and platform dependent (e.g win64). I have managed to make it working with some hits from the MS forums... Now it is the better part of parsing the "right" arguments...

    Basically I had to change the getCommandLine from String to Long:
    Private Declare Function GetCommandLineL Lib "kernel32" Alias "GetCommandLineA" () As Long