This innovative first from Admin Script Editor remains the most comprehensive solution available for script portability. The ScriptPackager™ provides the ability create secure executable packages from your scripts
Read about...
...ScriptPackager Command Line Arguments
...ScriptPackager Environment Variables
For a list of options and explanations of each, see our Package Creation Overview.
For specifically how to create a package using your language of choice, see ScriptPackager Examples.
Tip: You can rename your packaged executable to "<filename>_debug.exe" to have its return code presented in a dialog box for quick troubleshooting purposes