Problem Calling same User-defined Command 2x in a row

I have submitted in a thread, under the Title "UAC ADMIN PROMPT" , a picture of 2 Button and 2 User defined Command (UDC).
I am opening a new thread as this problem here was irrelevant to this last thread.

Now, if I call from a Button, 2 times in a row, the same UDC with a different argument (in this case a PATH), only the first instance is execute.
Button: Turn_OFF_Lock

Lock_OFF PATH_TO_UNLOCK="D:\Pending Transaction Folder"
Lock_OFF PATH_TO_UNLOCK ="D:\Pending Payment Folder"


Template: Path_to_Unlock/O
Icacls "&Path_to_Unlock&"  /remove:d *S-1-1-0 /T /C 

From the Button, Turn_OFF_Lock, only the first line is execute as if OPUS do not handle 2 instance of the same Call to a UDC inside a Button. Even if I split apart in the Button, the 2 Call to the same UDC with some other code, like " set viewpane=on", the second call will still not execute. A bug or this situation has never been anticipated in advance customize mode?.

"It's possible the icacls command is failing (maybe because it needs admin rights) and stopping the rest of the command."

What happens if you get rid of the user-defined command and put the two Icacls commands, with appropriate paths, directly in the main button?

Also, set the function type to MS-DOS Batch Function, and add a line that runs the Pause command to the end. Then you can read the error output of the Icacls command to see what is happening.

Hi Leo,
I have joined a Screen shot of some test result.
The JPG Image contain 4 CMD Windows.
The 2 at the top (left and right ) are for using the ICACLS line straight from the Button 2 time in a row (without calling the User defined Command (UDC)
The 2 at the Bottom (left and right ) are for using the ICACLS by calling from the Button the UDC 2 time in a row. :question:

As you can see, if the ICACLS is execute straight from the Button, bot directory get LOCK or Unlock.
But if I call the UDC (2 time in a row) from the Button, only the first line is execute (only one directory get Lock or Unlock). SO I can always use the ICACLS command line straight from the Button.
But is there a reason that if you call a User defined command 2 time in a row from a Button only one instance get executed. This would have to be check using a different UDC doing simple task and see
what happen if it is call 2 time in a row in a Button. Haven't try yet. Ran out of time.

We've looked into this in detail and found a bug where running the same user-defined command twice in one button would not work.

That should be fixed in the next update.

For now, you can either duplicate the command so you have two copies of it, or avoid using a user-defined command at all and put everything directly in the button.

Thanks Leo,
I am glad I was of a little assistance. I can "survive" with that right now. I have been running the commands inside of the Button for now which is OK.

Also, since I started that thread, I would like to say that I just tested 11.7.5 Beta as regard this problem mentioned here and again I confirm that it is fixed with 11.7.5.
Good Job Guy