Hide Command Window of .BAT file that Executes Another .EXE File

Using start works for me: @echo off copy “C:\Remoting.config-Training” “C:\Remoting.config” start C:\ThirdParty.exe EDIT: Ok, looking more closely, start seems to interpret the first parameter as the new window title if quoted. So, if you need to quote the path to your ThirdParty.exe you must supply a title string as well. Examples: :: Title not needed: … Read more

How do you avoid over-populating the PATH Environment Variable in Windows?

This will parse your %PATH% environment variable and convert each directory to its shortname equivalent and then piece it all back together: @echo off SET MyPath=%PATH% echo %MyPath% echo — setlocal EnableDelayedExpansion SET TempPath=”%MyPath:;=”;”%” SET var= FOR %%a IN (%TempPath%) DO ( IF exist %%~sa ( SET “var=!var!;%%~sa” ) ELSE ( echo %%a does not … Read more

How to compile a linux shell script to be a standalone executable *binary* (i.e. not just e.g. chmod 755)?

The solution that fully meets my needs would be SHC – a free tool, or CCsh a commercial tool. Both compile shell scripts to C, which then can be compiled using a C compiler. Links about SHC: https://github.com/neurobin/shc http://www.datsi.fi.upm.es/~frosal/ http://www.downloadplex.com/Linux/System-Utilities/Shell-Tools/Download-shc_70414.html Links about CCsh: http://www.comeaucomputing.com/faqs/ccshlit.html

How to alloc a executable memory buffer?

You don’t use malloc for that. Why would you anyway, in a C++ program? You also don’t use new for executable memory, however. There’s the Windows-specific VirtualAlloc function to reserve memory which you then mark as executable with the VirtualProtect function applying, for instance, the PAGE_EXECUTE_READ flag. When you have done that, you can cast … Read more

Python executables: py2exe or PyInstaller?

Py2exe and PyInstaller both are wrappers but here are few differences that I noticed, Py2exe is compatible with python2.4+ including python3.0 & 3.1 whereas PyInstaller is currently, compatible with python 2.7 and 3.3–3.5 As far I know, Py2exe didn’t support signing whereas Pyinstaller has support for signing from version 1.4 In PyInstaller it is easy … Read more

Reason for huge size of compiled executable of Go

This exact question appears in the official FAQ: Why is my trivial program such a large binary? Quoting the answer: The linkers in the gc tool chain (5l, 6l, and 8l) do static linking. All Go binaries therefore include the Go run-time, along with the run-time type information necessary to support dynamic type checks, reflection, … Read more

tech