←back to thread

195 points _ol1s | 2 comments | | HN request time: 0s | 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 #
1. andy81 ◴[] No.41086096[source]
You 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.

replies(1): >>41087551 #
2. ffsm8 ◴[] No.41087551[source]
Which 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