5 ms·
Wow, this is the largest batchfile I've ever seen! And I thought my 200-ish line one from high school was pushing it. Honestly huge respect for having the dedic
by torphedo 2y ago
Wow, this is the largest batchfile I've ever seen! And I thought my 200-ish line one from high school was pushing it. Honestly huge respect for having the dedication to go this far with batch. I knew about the pseudo-function-calling features and a little bit of the weird syntax, but just skimming there's a lot of stuff in here I haven't seen before. Usually people saying "X in Y KiB" are doing some crazy linker shenanigans, so this was refreshing.
Also, "Windows To Go" and "Windows To Stay" are really funny feature names.
- Firehawke 2y agoNot to get TOO far off topic, but you just reminded me of the 300+ line batch file I was using for my BBS back in the early 90s. Lots of errorlevel checks to handle door transitions, Fidonet, etc. You could get some ridiculously complicated batch files if you really needed the added functionality.
- efdee 2y agoWow, unexpected trip down memory lane. Thanks. Press ESC twice for nostalgia.
- deleted 2y ago[deleted]
- Mogzol 2y agoSpeaking of large batch files, if anyone has ever softmodded a Wii, there is a good chance you used ModMii, which is by far the largest batch program I've seen. The main script [1] is a batch file that clocks in at over a megabyte. I used to be pretty into the Wii modding scene and remember talking with the author of that script about random batch things a few times. I can't imagine maintaining a file that big. [1] https://github.com/modmii/modmii.github.io/blob/master/Support/ModMii.bat https://github.com/modmii/modmii.github.io/blob/master/Suppo...
- nyanpasu64 2y agoIt's sad that so many projects simply stopped updating a decade or more ago... the first 90% of work is building a USB loader and the second 90% is maintaining it, and neither the author nor I want to figure it out. I read online that SNEEK lets you screenshot games... it doesn't work (wrong filesystem? neek2o and sneek have a different feature set?). Also god all those Exception (DSI) and learning a decade later they were segfaults... yummy memory-unsafe embedded programming. I found that ModMii leaked some global variables from a (failed) SNEEK install to a system menu mod('s help file), and being written in Batch certainly explains things...
- sllabres 2y agoI once knew a (very old) old accounting system that had to work around a 64kB limit and therefor used a programmatically generated set of many hundreds batch files batch files calling each other (not containing the program logic of course). But each of them was less than 100 lines long. But 27 kLOC for the WII thing or 3 kLOC for the recovery tool which even looks a bit more convoluted then the WII thing sounds interesting to maintain. On the other hand, if it works, no dependencies no 200 MB binary blob.
- sunaookami 2y agoDon't forget that it even has a GUI made with Wizard's Apprentice which is created and controlled by a similar large batch file: https://github.com/modmii/modmii.github.io/blob/master/Support/ModMiiSkin.bat https://github.com/modmii/modmii.github.io/blob/master/Suppo... :D
- torphedo 2y ago21k loc, one file... dear god. that trumps it all, for sure. and wow, the repo is still getting active commits.
- Kwpolska 2y ago"Windows To Go" is the official name for a former Windows feature. Writing a Batch script of any length, let alone 3085 lines, is completely insane with PowerShell being part of the default install.
- maccard 2y agoI write tools for video game studios occasionally. You can’t double click a ps1 script and have it run, and you need to change the execution policy for powershell scripts to run. Those two hurdles for non technical people mean that we still write batch scripts
- TiredOfLife 2y agoBut you can run .ps1 from .bat that you doubleclick.
- kachapopopow 2y agoThat still has the same issue. Powershell will refuse to run scripts that are not signed by default.
- andy81 2y agoYou can use the -ExecutionPolicy argument to get around that. It's not a security boundary, just something to stop users accidentally opening an email attachment like they will with bat/vbs.
- ffsm8 2y agoWhich is pointless if it's only for powershell.... But hey, security theater is kinda the MO of Microsoft if you think about rotating password policies which have a maximum password length etc
- naikrovek 2y agoSign the powershell script. It’s not that large of a hurdle to get a code signing cert, though it certainly isn’t trivial.