A simple launcher tool... Topic is solved

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
newbieforever
Posts: 493
Joined: 24 Aug 2016, 03:34

A simple launcher tool...

21 Jun 2018, 04:49

I am using a compiled AHK script "Launcher.exe" which just runs another exe and passes the CL parameters to it. But this Launcher.exe is an executable of about 400 kB size, of course. My problem is: I would need an executable with a size of < 50 kB. (Please don't ask what is the background of this whole setting, it makes sense in my project.)

Used e.g. in a Windows shortcut:
"Launcher.exe" "/run:My Exe.exe" "Par 1" "Par 2" [...]

To put it in the simplest possible way: Even a simple BatchFile.bat with the content:

start "" %1 %2 %3 %4

could be run in DOS it this manner:

C:\>BatchFile.bat "" "My Exe.exe" "Par 1" "Par 2" [...]

and would run the 'My Exe.exe' with the specified parameters.

That is exactly what I would need, but:
– as an executable
– with a size of < 50 kB
- supporting Unicode characters in file names and parameters (!)
- running on every Windows machine (no .NET dependency or...)

My specific question:
– Does someone here know such a tool (it must be open source)?
- If not, in which programming language such a tool could be written in the easiest way?
In both cases there should be a free compiler available to compile the code.

NOTE: I'm more than amazed that such a tool
– can easily be written in AHK* and
– the same functionality is provided already by an one-line batch script**,
but the same seems to be hardly to implement in a higher-level programming language (mainly because of the Unicode support?).
Or am I wrong?


* ... executable too big
** ... without Unicode support and not as an executable
newbieforever
Posts: 493
Joined: 24 Aug 2016, 03:34

Re: A simple launcher tool...

22 Jun 2018, 02:18

tmplinshi wrote:https://freebasic.net/
The output exe is about 25 kb.
You saved my life, tmplinshi! Thank you very much!
newbieforever
Posts: 493
Joined: 24 Aug 2016, 03:34

Re: A simple launcher tool...

03 Jul 2018, 03:54

newbieforever wrote:You saved my life, tmplinshi! Thank you very much!
... But I think I am ill again. Freebasic is a cool thing, but my project seems to fail due to FB's limited unicode support.

No other alternatives?



Just a reminder:
The language must enable to create a tool:
– as an executable
– with a size of < 50 kB
- supporting Unicode characters in file names and parameters (!)
- running on every Windows machine (no .NET dependency or...)
tmplinshi
Posts: 1604
Joined: 01 Oct 2013, 14:57

Re: A simple launcher tool...

03 Jul 2018, 05:32

I'm using WIN10 x64 (Chinese language), I have no issues passing unicode filenames and parameters.

Code: Select all

Print Command(1) ; " " ; Command(2)
Exec ( Command(1), Command(2) )
Image

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: mikeyww and 285 guests