There is a way to convert a batch file into an exe using the on-board tools of Windows 10/11.
Officially with the "IExpress Wizard" tool from Microsoft that is included in the OS.
Start iexpress.exe with admin rights (located in "C:\Windows\System32\")
[x] = "Create a new Self Extraction Directive file." -> Next
[x] = "Extract files and run an installation command." -> Next
Assign any name -> Next
[x] = "No prompt" at "Confirmation prompt" -> Next
[x] = "Do not display a license" at "License agreement" -> Next
In the "Packaged files" section, click "Add" and select the desired BAT/CMD file. -> Next
Now you get to "Install Program to Launch", there in the "Install Program" field insert "cmd /c", followed by the path to the above BAT/CMD file (example: "emptyrecyclebin.bat" => "cmd /c C :\Path\emptyrecyclebin.bat" - put the file in quotation marks or use the appropriate paths/names!).
"Post Install Command" stays on "<None>" -> Next
[x] = "Hidden" in the "Show window" section -> Next
[x] = "No message" at "Finished message" -> Next
On the "Package Name and Options" page, click "Browse" to specify the path and name of the EXE file to be created.
[x] = "Hide File Extracting Progress Animation from User"
[ ] = "Store files using Long File Name inside Package" -> Next
[x] = "No restart" at "Configure restart" -> Next
(Now you have the option to create an SED config file if you want to load the settings again later.) -> Next
"Create package" -> Next
Finished! If everything went well, the EXE should be in the desired directory.
Translated with Google Translator from hier