Hi Rajaram,
I can add the exe and run it successfully. Can you give us more details about the issue on your end?
To select the .EXE file, please make sure all these files are placed in the same folder or sub-folder of the application target (.pbt) file, otherwise, you cannot select it.
Please note that the external files cannot contain any file that has the same name as the application or the PBD or p-code file to be generated, otherwise, the duplicate name error occurs. For example, [appname].exe.
You can find the above information in the online document below.
https://docs.appeon.com/ps2021/Define_the_PowerServer_projects.html
To run the .EXE file, you can run it via the Run function (might need administrator permission) in PowerBuilder application, for example:
run(GetCurrentDirectory ( ) + '\' + %file name%)
Or you can run it via a command in preload event, the commands in Preload event can be any Windows commands or user-defined commands, you can do any custom operations by running a batch file in Preload event.
Please refer to the articles below for details.
https://docs.appeon.com/ps2021/Define_the_PowerServer_projects.html (refer to the section of "Preload event")
https://community.appeon.com/index.php/qna/q-a/power-client-installation-of-batch-file (a practical example on the usage of external files and Preload event, though it is about PowerClient, it applies to PowerServer 2021 as well.)
Regards,
Kai