Embedding an exe in a program [Answered]
I know this sounds super sus, but I wanna write an installer for a CLI tool which just copies an executable to a specified directory and then adds that directory to the user's PATH. My question is mainly how I should embed the executable. I know embedded resources exist and how to use them, although would that be the best option to do this?
5 Replies
I'd go with an embedded resource -- there aren't really many options here
fair
Was just wondering if there was anything else
In my experience, antiviruses get very upset when you embed executables; if you have problems with that, it might be best to just have the user extract a zip containing the installer and executable
(The 'install' could then be done via batch file to further keep antivirus off your back)
7-zip has a lot of stuff to create customised self-extracting archives (SFX). I think that might include env vars? The docs are all pretty old, but https://sourceforge.net/projects/s-zipsfxbuilder/ has a "SetEnvironment" tab...
SourceForge
7z SFX Builder
Download 7z SFX Builder for free. Create 7z SFX configuration files and manage them as projects. This software is designed to create and manage 7zip SFX configuration files for modified SFX module by Oleg Scherbakov, which is not in active development now (and probably won't ever be). So, I think this project has nothing to do anymore.
✅ This post has been marked as answered!