This is just a bunch of links I've compiled over the years, (mostly) useful stuff.
INTRODUCTION
TOOLS/UTILITIES
System Utilities
Audio/Video Utilities
Imaging Utilities
3D Utilities
Document Utilities
Web Browsing, Security, and Utilities
PROGRAMMING
C/C++
Python
Assembly (ASM)
PowerShell
Batch, VBScript, JScript
HTML5
CSS
JavaScript
Regex
Markdown
GAMING
Homeworld Remastered
Phantom Forces
Red Dead Redemption 2
Grand Theft Auto
Minecraft
Tom Clancy's Ghost Recon Wildlands
Emulation
Nintendo DS
SNES
GameBoy
Minetest
Forza
QUOTES
BAT2EXE
This document is just some notes I've taken of programs/techniques I've used over the years. Mostly programming and gaming related, but some system utilities are linked as well. [bazinga]
ASUS ROG Zephyrus GA401QM (2021 G14) Review — A not-so-in-depth review of the 2021 ASUS G14 because I'm a fucking normie piece of shit.
If you, by chance, are curious about the "best" AA battery, take a quick ten minute glance at Project Farm's AA battery comparison.
These are tools and references I've used in the past, distant and recent. I do not link to things I've not used/tried myself for credibility reasons.
Tools:
- BleachBit — Alternative to CCleaner because Avast fucked it up.
- 7-Zip — File compression and archiving. I was a WinRAR fanboy for over a decade. Why? No clue. [Source Code] ; use LZMA2 for binary/images, PPMd for plaintext.
- PowerISO — Powerful CD / DVD / BD image file processing tool, which allows you to open, extract, burn, create, edit, compress, encrypt, split and convert ISO files, and mount ISO files with internal virtual drive. It can process almost all CD / DVD / BD image files including ISO and BIN files. PowerISO provides an all-in-one solution. You can do every thing with your ISO files and disc image files.
- Rufus — Create bootable USB drives the easy way.
- balena Etcher — Flash OS images to SD cards & USB drives, safely and easily.
- CheatEngine — memory editor and process hook module; RAR archive isn't bundled with "optional" bloatware/adware. [Source Code]
- IconsExtract — extract icon resources from WinPE/DLL
- ResourceHacker — extract, edit, and repack WinPE/DLL resources
- WSL — universal CLI.
Distros:
- Linux Mint — Designed to work 'out of the box' and comes fully equipped with the apps most people need.
Articles:
- DO NOT DEFRAGMENT YOUR SSD — Defragmenting does nothing but spike write cycles, lowering SSD lifespan because of how they operate. This is not the case for HDDs with physical disks. Defragmenting is beneficial for HDDs, not SSDs.
- How to Check SSD Health in Windows 10 and Windows 11 — Click Search button from the Taskbar, type
cmd
, hit [ENTER], typewmic
, hit [ENTER], typediskdrive get status
, hit [ENTER]. - Compression Benchmark — Performance comparison of several compression algorithms. Also specifies file formats less fit for compression.
- How to Show All System Tray Icons on Windows 10 —
Settings < Personalization < Taskbar < Select which icons appear on the taskbar
Tools:
- yt-dlp — A fork of youtube-dl with additional features and fixes.
- yt-dlp FFmpeg — FFMpeg builds for yt-dlp. Forked from FFmpeg-Builds by BtbN. Certain builds have tons libraries already statically linked. Be sure to read the Targets, Variants, and Addins.
- OPUS Codec — Modern audio compression for the internet. Lossy, but it's a witchcrafty compression algorithm. [Docs] [Source Code]
- VLC — Media player. [Docs] [Source Code]
- Audacity — Audio editor. [Docs] [Source Code]
- LosslessCut — The Swiss army knife of lossless audio/video editing.
Articles:
- RIAA's failed attempt to shut down youtube-dl. :)
- Automate the downloading and conversion/extraction of audio/video using youtube-dl and ffmpeg.
- A video comparison of MP3, M4A, AAC-LC, AAC-HE v1, AAC-HE v2, and Opus codecs. No commentary. Includes separate tracks for the data lost with each codec, as well as the original
WAV
as a control. - Trim OPUS audio losslessly using ffmpeg and LosslessCut.
- How to merge audio and video file in ffmpeg
- Update album artwork in VLC by either moving the new artwork's folder outside of VLC scan paths and
VLC > Refresh
or by unchecking and re-checkingVLC > Media Library Folders > Internal Memory
.
Tools:
- GIMP — Image editor. Extensive support via plugins. [Docs] [Tutorials] [Source Code]
- nomacs — Image viewer with integrated adjustable window transparency.
- GreenShot — Screen capture software with autosave. [Github]
- ImageMagick — Image editor with command-line untilities. [Docs] [Source Code]
- Gifski — Make smooth GIF animations from video files. [GitHub]
References:
- DaFont — Huge database of fonts, free and proprietary.
- How to add fonts to Linux, Windows, and Mac OS X. Note, at the bottom it specifies you can place font files into
<GIMP_InstallDirectory>\etc\fonts
subdirectory to make them available to GIMP only. - Batch Converting via ImageMagick — With a
FOR
loop. - Image Formats Comparison — Slightly more recent fork of the original project by wyohknott.
- How to set default export format in GIMP? —
Edit
>Preferences
>Image Import & Export
- Blender — 3D Editor. [Docs] [Tutorials] [Source Code]
- Wings3D — 3D Editor. Considerably less-demanding than larger editors like Blender/3DSMax. I used Wings for modeling/texturing until I got a system powerful enough to run Blender without it freezing up every five minutes. [Source Code]
Word Processors:
- LibreOffice — collection of alternatives for MS Office. [Docs] [Source Code]
- Calibre — view and manage ebooks from desktop. [Docs] [Source Code]
Text/Code Editors:
- Notepad++ — Cross-platform code editor. Can be made into an IDE with Batch scripts, NPPExec, and Macros. [Docs] [Source Code]
- CudaText — Cross-platform code editor. [Source Code]
Other:
- Source Code Pro — This is the real deal. The one included in Nerd-Fonts is Sauce Code Pro.
- Nerd-Fonts — Iconic font aggregator, collection, & patcher.
- pandoc — Universal Markup converter.
- How to add spell checking in Notepad++. — using DSpellCheck.
References:
- List of Latin Abbreviations — On Wikipedia.
- "Facade" vs. "façade" — Let's argue about the C-cedilla
ç
- Search by Regular Expressions in Notepad++.
- Copying all lines hit by search in Notepad++. Useful for building indexes for Markdown documents.
- You can add fonts for just LibreOffice in
<LibreOffice_InstallDirectory>\program\resource\common\fonts
.
Browsers:
- Mozilla Firefox — open-source browser with extensive plugin support. [Source Code]
Plugins/Addons/Extensions:
- ViolentMonkey — Control how webpages operate using JavaScript "userscripts". Alternative for GreaseMonkey. [Source Code]
- PageHacker — an interactive "Inspect Element".
- UBlock Origin — efficient, wide-spectrum content blocker.
- RemoveAdblockThing — Removes the intrusive "Ad blockers are not allowed on YouTube" thing.
- The Stream Detector — HLS/DASH/HDS/MSS stream detector. Pinpoints
.m3u8
playlists from streams. [Source Code] - YouTube Video and Audio Downloader — WebX downloader with UI integrated to YouTube's.
- pdf.js — mirror of PDF reader included with Firefox installs.
References:
- DuckDuckGo — Regardless of whether or not you're using a VPN, utilize this alternate search engine.
- imgBB — Image hosting.
- unshorten.me — Unshorten any URL.
- MEGA — file upload and cloud storage.
- MediaFire — file upload and cloud storage.
- DropBox — file upload and cloud storage.
- OneDrive — file upload and cloud storage.
- Windscribe — VPN with a free plan offering 10GB per month. No, I am not sponsored by these folks.
- ProtonVPN — Brought to you by ProtonMail.
- How to link short URLs on Reddit.
Compilers:
- TDM-GCC — GNU Compiler Collection fit for Windows; available in both 32 and 64-bit configurations. I highly recommend using this over MSVC when installing offline is a concern because Microsoft has made the process of installing Visual Studio Build Tools the biggest pain in the ass possible. [Docs]
- MinGW-w64 — Advancement of the original
mingw.org
project, created to support the GCC compiler on Windows systems. [Docs] [Builds by niXman] - Visual Studio Build Tools — command-line build tools without the Visual Studio IDE or integration with it. [Docs]
IDEs:
- Code::Blocks — IDE for C, C++, and Fortran. [Docs] [Wiki] [Source Code] [Backup of v22.03 Built with TDM-GCC v10.3.0]
- VS Code — Jack of all trades (but master of none) code editor. Configurable with JSON scripts. Wide support spectrum via extensions. Can be made into an IDE, but with how involved in other garbage it's become that process is becoming increasingly (albeit needlessly) intricate. [Docs] [Task Info] [Editing 101] [Source Code]
Libraries:
- SDL — Cross-platform development library designed to provide low level access to audio, keyboard, mouse, joystick, and graphics hardware via OpenGL and Direct3D. [Docs] [Source Code]
- OpenGL — Cross-language, cross-platform API for rendering 2D and 3D vector graphics. [Wiki]
- EasyHook — The reinvention of Windows API hooking.
- wxWidgets — Cross-platform GUI library. Pairs well with wxFormBuilder, a GUI creator which can export wxWidgets-compatible code in both C++ and Python. [Docs] [Tutorials] [Source Code]
- Boost C++ Libraries — Set of libraries that provides support for tasks and structures such as linear algebra, pseudorandom number generation, multithreading, image processing, regular expressions, and unit testing. [Docs]
- OpenSSL — Crypto library. [GitHub Repo] [SHA-256 Example]
- SFML — Multi-platform, multi-language library which provides a simple interface to the various components of your PC to ease the development of games and multimedia applications. [Docs] available on downloads page. [Source Code]
- MD5 Message Digest Algorithm — Message Digest algorithm derived from RSA Data Security, Inc. [Original Source]
- md5-c — A simple, commented reference implementation of the MD5 hash algorithm.
- sha256-in-c — An implementation of the SHA256 Hashing Algorithm in C.
References:
- cplusplus.com — [C++ Tutorial] [Articles] [Reference]
- cprogramming.com — [C Tutorial] [C++ Tutorial]
Articles:
- Setting up VSCode to use GCC/MinGW
- Command-line linking with GCC. See SeKa's answer for a short explanation of the differences between "compiling" and "linking" with gcc and ld (respectively).
- Learn C++ in 10 Hours — A detailed tutorial covering everything you'll need to know for getting started. This is the most comprehensive video tutorial I've found. Somehow, it also has least rehashing of covered topics and superfluous explanations. Most everything is presented in a to-the-point manner.
- Why system() is evil. — A brief overview of why
system()
fromcstdlib
is evil. - An analysis of why Dev-C++ was deprecated.
- A somewhat detailed comparison between Rust and C++.
- Understanding C Program Compilation Process Using GCC — An explanation of the process with intermediate files and options needed when performing each step individually.
- Use regular expressions in Visual Studio.
Tools:
- Python — the programming language. [Docs] [Source Code]
- py2exe — converts Python scripts into Windows
.exe
format able to run without Python being installed. [Source Code] - unpy2exe — extract
.pyc
files from Windows.exe
files created with py2exe. - python-decompile3 — bytecode decompiler for Python v3.7-3.8
.pyc
files. A refactor of python-uncompyle6 to fix long-standing problems. - hashID — identifies different types of hashes.
Libraries:
- wxPython — cross-platform GUI toolkit. [Wiki] [Docs] [Source Code]
- hashlib — Part of Python Standard Library. Generate secure hashes and message digests. [SHA256 File Example]
References:
- Design of CPython's Compiler. Referenced from this StackOverflow post.
- dis — bytecode disassembler module
- py_compile — bytecode compiler module
Articles:
- Piping and executing external commands in Python.
- Discussion on the Python compilation/interpretation process.
Tools:
- FASM — flat assembler for 32 and 64-bit code. [Docs] [Examples] [Backup of v17.33.0]
- Olly — x86 assembly-level debugger.
Articles:
- How to call C functions in FASM.
- The differences between x86, x86-64, and x64 explained.
- How to determine what language a compiled/packaged program was written in.
- How to debug using GDB, a quick overview with a basic example.
- Reversing and cracking first simple program, a video tutorial using
gdb
.
References:
Implementations of Interest:
Tools:
- PowerShell — scripting language. [Docs]
- Invoke-CmdScript — call CMD scripts from PowerShell. [Backup] [Backup of Backup]
References:
- SS64 — PowerShell command reference.
Tools:
References:
- SS64 — CMD (Batch) command reference.
- Rob van der Woude's Scripting Pages — A collection of (administrative) scripting related information.
- Making a Batch to Executable converter. — A quick run-down of the general process.
References:
- HTML5 — MDN reference.
References:
- CSS — MDN reference.
References:
- JavaScript — MDN reference.
References:
Tools:
- Turndown — HTML to Markdown converter written in HTML and JavaScript.
References:
- Markdown Previewer
- Markdown Cheat Sheet — MD syntax quick reference.
- GitHub Markdown CSS — The minimal amount of CSS to replicate the GitHub Markdown style. Demo.
Articles:
- Edit/Preview Markdown in VS Code — tutorial/reference.
- MyAbandonware — Retro gaming hub.
- AutoHotKey — Keyboard and mouse macros via scripting. Source code on GitHub.
- Cookie Clicker — The classic idle (AFK) game on GitHub.
- How do Video Game Graphics Work? — A video explanation by Branch Education.
Tools:
- bigDecrypter — Decrypts HWR BIG files. for use with ModPackager/HW2ICArchive.
- Mod Tools — Based on the Homeworld Universe Mod Tools which has pretty much every tool known to the Homeworld modding community, though I've added some others I've found along the way. Including fda2aifc, No-CD Patches, skunk's Map Editor, the RDN Toolkit (with update), CFLuaDC, HWCDRP (decompiled data), all archival versions of CFHodEd, and even
.chm
backups of the old Karos Graveyard modding resources. Since the removal of the RelicNews forums I imagine a lot of what could be done with these has been lost, but the tools are here and if all else fails we have the Wayback Machine. - CFHodEd — Universal
.hod
Editor for both classic and remastered Homeworld games. - Hw2 Official v1.1 Patch — The only official HW2 game update from Relic. This is also included in the Mod Tools listed above.
- HomeworldSDL — source code for HW1's game engine.
Mods:
- Complex Simple — Massive mod based on the Complex mod. Siliconworm has made it clear that he will not adapt the mod to HWR because "reasons".
- Tactical Fleet Simulator — Transforms Homeworld2 into a tactics-oriented strategy game.
- R.E.A.R.M. — Rearmament Expansion And Redesign Mod for Hw2 classic. R.E.A.R.M. V2 is adapted to HWR, but it seems Pouk hasn't made significant progress in a very long time.
- Homeworld 2 Complex — Complex mod, originally developed for Hw2 classic. Complex Remastered is the adapted to HWR.
References:
- HW2 Manual PDF — A direct PDF copy of the game manual. (Not a scanned copy.)
- HW2 Function Reference (Online) — online function reference.
- HWRM Karos Graveyard — old-style Karos Graveyard for HWRM.
- PHANTOMFORCES.MD — Notes on the game for Roblox. Random, niche stuff like what weapons have muzzle attachments that use base barrel textures/materials, some color notes on existing vanilla weapon colors/textures (yeah so you can have your Beowulf ECR the same color as the C7A2), etc.
Roblox FPS Unlocker — Got a decently beefy system that can run over 60 fps? Use it. Roblox announced years ago that they won't be handing out bans for those using only FPS unlockers.— Deprecated. Roblox finally added frame limits within the platform.
- RDR2.MD — Copy of the notes file from
rdr2-maps
. Notes of stuff I've encountered and tested in over 8,000 hours on RDR2. - Animal Location Maps — Rare animal location maps. Woodpeckers, moose, panthers, etc.
ITEM | DESCRIPTION |
---|---|
GTA5.MD | Notes on single player GTA V. Rare vehicles, unique vehicles, NPC-modified vehicles, etc. Been playing since day one and probly have accumulated over 10k hours since 2013. |
Fixing GTA IV with 4 Mods | Video explanation of what to install and how they work. |
FusionFix | Aims to fix some issues in GTA IV: Complete Edition. |
Console Visuals: The Complete Edition | Compilation of console visual restoration for GTA IV: Complete Edition for PC. |
Various Fixes | Fixes various bugs in GTA IV. Mod is not limited only on fixes, it also includes restoration of some things, console content, various texture improvements, etc. |
Downgrader | Downgraders for GTA IV. |
dxvk | Vulkan-based implementation of D3D9, D3D10 and D3D11 for Linux / Wine. |
- mc-stuff — Notes on solo Minecraft, specifically Java Edition.
Tools:
- UltimMC — Fork of MultiMC allowing use of offline accounts.
- Prism Launcher — Fork of Prism Launcher allowing use of offline accounts.
- Java — JDK downloads.
- Chunk Base — Various tools and resources for Minecraft players and modders.
- Cubiomes Viewer — An efficient graphical Minecraft seed finder and map viewer.
Mod Platforms:
- Forge — Long-standing mod platform. Sticks and stones. Snowflakes need not apply. Grow up and use Forge.
Mods:
- VanillaTweaks — Minimal changes sticking to as close to vanilla Minecraft as possible.
- JEI — Just enough items.
- Xaero's Minimap — Minimap.
- WorldEdit — In-game map editor.
- Advanced Finders — Adds several ore finders to make the mining process much more interesting and time-saving.
- Large Ore Deposits — Adds very rare, but super-massive ore deposits to the world.
- Clumps — Clumps XP orbs together.
- Corpse — Retreive your items easier.
References:
- Eyecraftmc — Guides.
- Shulkercraft — Farm builds.
- Voltrox — Farm builds.
- TCGRW.MD — Referential document containing weapon, vehicle, and NPC data gathered while playing Tom Clancy's Ghost Recon Wildlands. I have over 6k hours in this game.
- Fate v1.23b (Multi5) — Full version of the Diablo clone.
- Fate v1.21 — The original Fate version
1.21
plus the official add-ons that were started for download on the official Fate website. - Source Code — The source code to the game FATE and it's sequel/expansion FATE: Undiscovered Realms. These leaked when Humble Bundle accidentally distributed copies of the source code instead of the final build.
- Ultimate Modpack — Compilation of many mods created over the years.
- Mods on PCTalk — Archive of mods.
- Mods on Nexus — Newer mods.
Archives:
- NO-INTRO ROM Sets — NO-INTRO (naming scheme) ROM sets.
- Rom Center Markdown Edition 2023 —
/r/Roms
subreddit Megathread in Markdown. - RetroArch BIOS Collection — BIOS for many, many systems. Also available on GitHub.
ROM Patchers:
- Floating IPS — An updated alternative to Lunar IPS. Applies and creates
.ips
,.bps
, and.ups
patches. Pre-built binaries can be found on SMW Central. - DeltaPatcher — GUI interface for applying and creating
.xdelta
patches. - WASM xdelta Patcher — Online
.xdelta
patcher.
Miscellaneous:
- Meteo AVI to GBA — A codec which encodes
.avi
files into.gba
video format. - RetroArch Overlays —
Emulators:
Archives:
- NDSFullset — Nintendo DS ROMs.
- Cylum's NDS ROM Collection —
- Cyles' NDS US ROM Pack —
- Ghostware ROM Collection —
- nds-romset —
References:
Emulators:
- snes9x — Recommended. Portable SNES emulator. Pre-built binaries availalbe on official site.
- bsnes — SNES emulator focused on performance, features, and ease of use. Pre-built binaries available on official site.
- ares — Cross-platform, open source, multi-system emulator, focusing on accuracy and preservation. Pre-built binaries can be downloaded from the official site.
Tools:
- Lunar Magic — THE essential program needed to make SMW hacks. Closed source. Also available on official site.
- LMSW — Plugin which allows the internal emulator in Lunar Magic to be used. Open source.
- ROMclean — checks if your ROM is a clean, headered
(U) [!]
ROM. If it's unclean, it tries to clean it. JavaScript version for those paranoid about downloading things. Open source. - NPP_HexEdit — Notepad++ Hex Editor plugin. Open source.
References:
- SNES Emulators Comparison —
- SMWCentral — Everything SMW hacking. [Tools] [Docs] [ROM Hacks]
- SMW Hacking Guide — Beginner's guide Hosted on SMWCentral.
- FuSoYa's Niche — SMW hacking tools; though I think FuSoYa has moved most everything to SMWCentral.
- List of SMW Glitches — on MarioWiki.
- SMW Glitch List — SMW glitch notes.
Emulators:
- mGBA — Recommended. GB/GBC/SGB/GBA emulator. Open source. Link support. Integrated BIOS. Pre-built binaries available on official site.
- SameBoy — GB/GBC/SGB emulator. Open source.
- BGB — GB/GBC/SGB emulator. [libmobile for BGB]
- TGB Dual L — GB/GBC emulator. Link support.
- VBA-M — GB/GBC/SGB/GBA emulator. Link support. Nightly builds available on official site.
Games:
- GBA US ROMs —
- Cylum's GBA ROM Collection —
- Cyles' GBA ROM Pack —
- pokeyellow — Disassembly of Pokémon Yellow.
- pokecrystal — Disassembly of Pokémon Crystal.
- pokeemerald — Decompilation of Pokémon Emerald.
- pokefirered — Decompilation of Pokémon FireRed.
- pokeheartgold — Decompilation of Pokémon HeartGold.
- pokeplatinum — Decompilation of Pokémon Platinum.
ROM Hacks:
- Yellow Advanced 2019 — Fixes most issues present in OG Yellow.
- Patched Crystal — Fixes most issues in OG Crystal.
- Modern Emerald — Modernization of the original Pokémon Emerald. Source code available on GitHub.
- Emerald Final — Lots of improvements on OG Emerald.
- pokecrystal-mobile — Fork of pokecrystal with Mobile Adapter features.
- Polished Crystal — Overhaul of Crystal. Many story deviations and such, but nothing jarring.
- R.O.W.E. — Massive backport of modern games' features into Emerald.
- Flawless Platinum — Overhaul of Platinum.
Tools:
- rgbds — Rednex Game Boy Development System. An assembly toolchain for the Nintendo Game Boy and Game Boy Color.
- SGB Border Injector —
References:
- GameFAQs — Walkthroughs, reference docs, cheat codes, glitches, etc.
- Bulbapedia — Walkthroughs, wiki, reference docs, glitches, etc.
- Serebii — Reference docs.
- IIMarckus's Site — the brains behind the PRET disassemblies.
- Pokémon Gen3 ACE Tutorials —
Emulators:
- melonDS — DS/DSi emulator, sorta. Pre-built binaries available on official site.
- DeSmuME — Long-standing DS emulator. Pre-built binaries available on official site.
Tools:
- NDS Firmware & BIOS — Archive of BIOS dumps. Also available on GitHub.
- DeadSkullzJr's NDS(i) Cheat Databases — Archive of Action Replay DS cheat codes.
- Minetest — an open source voxel game engine. Basically Minecraft that runs native rather than through JVM/JRE. [Wiki]
Articles:
- Creating Accurate Logos — tutorial by PJTierney. I recommend using nomacs; link in Imaging Utilities.
tl;dr No. For your purpose, that being you just want to convert the script to an executable, you'll be moving Heaven and Earth to avoid present-day AV detection. An executable extracting a system script to some directory then (attempting to) execute it looks suspicious as shit regardless of the circumstance(s). If, by chance, that piques your interest, I've jotted down some stuff I've used/referenced over the years. Further down I've explained how to go about making your own "converter".
If you're on sort of the same path I was back when I was big into Batch scripting, as in running across something I wanted to make an executable for whatever reason, you may want to look into learning C and/or C++. They're both catch-all languages. If your system allows it, either of them can do it. Though, from my perspective C++ is superior for my needs/wants. C is just the predecessor of C++, but it works much better for applications that focus on size/speed (such as both the stub and BAT 2 EXE "converter" or "compiler" in this case).
Those references I mentioned:
https://github.com/subvod/examples#cc
The usual process of making an EXE "converter" yourself is as follows:
1. Create a very small stub that will hold the script. Assembly is the best for stubs because you can define your own data section for very large scripts. Depending on the character count of the script itself, you might be able to split it into individual strings using the appropriate termination characters as needed. (Those being\n
,\t
, etc.) I'd say 64-character strings, but you can use more if needed. 64x64 allows 4,096 character scripts. You can use longer strings, but I'm unfamiliar with how long strings fare against numerous smaller strings.
2. Force the stub to extract the script to a new file, usually in%USERPROFILE%
(sometimes the Documents folder works fine) or%TEMP%
. If it is stored in strings, concatenate all the strings utilized for storing the script, then write it to a new time, for exampletemp.bat
in some accessible directory.
https://stackoverflow.com/q/308695
https://stackoverflow.com/q/15319859 (C++)
Alternatively, and I'd argue the less-demanding way, is to simply append each string to the file:
https://www.cprogramming.com/tutorial/cfileio.html
https://stackoverflow.com/q/19429138
https://www.cplusplus.com/doc/tutorial/files/ (C++)
https://stackoverflow.com/q/2393345 (C++)
3. For execution, you can run the script directly from the stub or run it within the stub's own CLI window.
4. As far as deleting the script after execution, Windows API'sDeleteFile()
can be used:
https://stackoverflow.com/a/33916912
https://docs.microsoft.com/en-us/windows/win32/api/winbase/nf-winbase-deletefile
And, since you're scripting Batch I'm assuming you're primarily on Windows. As far as making the stub goes, it can be done in any language, but preferably one that compiles to native. My top picks are C, C++, and ASM. This would be a huge step if, again, you're in the same position I was many years ago. But... if you're focusing on "converting" a Batch script to executable, I say make the stub with FASM:
https://flatassembler.net/
https://docs.microsoft.com/en-us/cpp/c-language/maximum-string-length?view=msvc-170
https://board.flatassembler.net/topic.php?t=18707
https://board.flatassembler.net/topic.php?t=5900
https://board.flatassembler.net/topic.php?p=80851
As for AV avoidance, obfuscation and encryption are the best methods. However, as I mentioned earlier, a small stub writing and executing file(s) parallels a tuna boat passing by. Basically, you'll end up making a crypter, which is a whole other animal in itself:
https://hackforums.net/showthread.php?tid=6154191&pid=60762821#pid60762821