←back to thread

195 points _ol1s | 2 comments | | HN request time: 0.544s | source
Show context
torphedo ◴[] No.41084297[source]
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.

replies(4): >>41084376 #>>41084508 #>>41084695 #>>41085137 #
Kwpolska ◴[] No.41085137[source]
"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.

replies(1): >>41085268 #
maccard ◴[] No.41085268[source]
I 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
replies(1): >>41085333 #
TiredOfLife ◴[] No.41085333[source]
But you can run .ps1 from .bat that you doubleclick.
replies(2): >>41085615 #>>41087080 #
kachapopopow ◴[] No.41085615[source]
That still has the same issue. Powershell will refuse to run scripts that are not signed by default.
replies(2): >>41086096 #>>41087878 #
naikrovek ◴[] No.41087878[source]
Sign the powershell script. It’s not that large of a hurdle to get a code signing cert, though it certainly isn’t trivial.
replies(2): >>41089436 #>>41098794 #
gloosx ◴[] No.41098794[source]
You have to go through a humilating process to get it as well as pay few hundred $$$ to one of MS street vendors.
replies(1): >>41100134 #
naikrovek ◴[] No.41100134[source]
you have to prove who you are, yes. I don't know what you mean in the 2nd half of the sentence.
replies(1): >>41159530 #
1. gloosx ◴[] No.41159530[source]
lemme explain quickly: you have to prove a lot of different things on paper, not just who you are; in reality this is just a money-milking side-hustle business for Microsoft. The process I had to go through had many different steps but in the end it all just relied on a blind trust between me and vetting team from the first step.
replies(1): >>41161069 #
2. naikrovek ◴[] No.41161069[source]
lemme respond quickly: code signing certs are in use by many more than just microsoft. if i want a code signing cert from digicert, microsoft doesn't get any money, digicert does. i can use it for more than just powershell scripts, of course, i can sign anything. they are useful things to have. getting them is a pain in the ass, yes, but it's supposed to be. they want to filter out identity impersonators and do everything they can to issue a cert to a person that is who they say they are. that's the whole point of the cert, so that's why you must show all of that proof.