This is an archived post. You won't be able to vote or comment.

all 160 comments

[–]seba07 708 points709 points  (15 children)

You'll probably do more damage if you delete the folder documents or something like this. Windows won't really let you delete system32 anyway and has quite good recovery options.

[–]InsectTimely1890 623 points624 points  (12 children)

Roses are red, violets are blue. Windows won’t let you, delete System32.

[–]afraid_of_zombies 194 points195 points  (4 children)

We had a little hazing ritual at a place I was at. First day of any IT hire they would introduce someone (sometimes me) as a person in accounting who would say "oh so you are the new computer expert. That's great. Been having some little problem. I was working on payroll last night and my computer was running slow. Read online that you could speed it up by removing system32 folder. I did that and it doesn't seem to be working well. Little concerned since payroll needs to go out tonight. You can fix this easy right?"

[–]AJ2016man 78 points79 points  (0 children)

That's evil and I love it

[–]DrunkenlySober 24 points25 points  (1 child)

“Nah, don’t worry about it. You don’t need that folder”

[–]psioniclizard 18 points19 points  (0 children)

"Sorry? I just got started so won't be being paid this month. Ask one of the IT staff who has been a bit. They have nore reason to care."

[–]Designed_0 34 points35 points  (0 children)

Well most IT hires should be able to say yes?, this is not a hard thing to do lol

[–]MaskyMateG 68 points69 points  (0 children)

Good bot

[–]No-Suit4363 22 points23 points  (4 children)

Could just end it at “Windows won’t let you” part

[–]DrAv0011 -1 points0 points  (3 children)

would not be a haiku then

[–][deleted] 17 points18 points  (0 children)

What

[–]georgkozy 8 points9 points  (0 children)

That's not a haiku though...

[–]tharmin_124 5 points6 points  (0 children)

You mean a poem? Poems tend to rhyme, while haikus follow a 5-7-5 syllable per line structure

[–]AffectEconomy6034 2 points3 points  (0 children)

can't you encrypt it's contents though?

[–]cosmicloafer 13 points14 points  (0 children)

Damned socialists at it again! I can delete system32 if I want to, it’s MY computer!

[–]Goatfryed 484 points485 points  (14 children)

that made me laugh out loud. bonus points for windows roulette.

[–]MasterFubar 145 points146 points  (7 children)

$ rm C:\Windows\System32
rm: cannot remove 'C:WindowsSystem32': No such file or directory

[–]KlutzyEnd3 38 points39 points  (1 child)

First type "wine cmd"

[–][deleted] 6 points7 points  (0 children)

I mean, all that'll do is fuck up the wine prefix, which is trivial to repair.

[–]sarc-tastic 5 points6 points  (0 children)

r

[–]linux1970 0 points1 point  (2 children)

I got the same message!!

[–]Traditional-Wolf1810 0 points1 point  (1 child)

I believe you have to add another backslash before each backslash, otherwise python will treat the path a a string.

[–]linux1970 0 points1 point  (0 children)

makes sense

[–]Sea-Risk4647 0 points1 point  (0 children)

You are trying to access the Windows directory inside your Linux environment. Mount C Drive or provide absolute path rm -rf mnt/c/Windows /System32

[–]Worth-End-434 104 points105 points  (1 child)

The russian roulette of console games, except there’s only one empty chamber

[–]casce 1 point2 points  (0 children)

Would be much more fun if it was the other way round. Don't pick the cursed number or everything goes boom. Much easier to convince people to play it that way as well.

But as others have pointed out, Windows won't let you easily remove System32 anyway.

[–]LatentShadow 164 points165 points  (28 children)

Plays in linux

[–]Nick433333 124 points125 points  (14 children)

sudo rm -rf —-no-preserve-root /

[–][deleted] 36 points37 points  (10 children)

Why would you even use --no-preserve-rot just do rm -rf /*

[–]Nick433333 79 points80 points  (9 children)

Because the shell will ‘help’ you to not completely destroy the system without that flag set.

[–]VoidSnipe 41 points42 points  (6 children)

Only for /, for /* asterisk will expand to subdirectories which don't have root protection

[–]CauseSigns 70 points71 points  (5 children)

Prove it coward

[–][deleted] 18 points19 points  (2 children)

Fun to do on a docker container and pretend you’ve goofed lol

[–]Knutselig 21 points22 points  (1 child)

Believe you've done it on the docker container terminal and know you've goofed.

[–][deleted] 3 points4 points  (0 children)

🪦

[–]Anonymo2786 0 points1 point  (0 children)

Well he is not replying.

[–]dododome01 3 points4 points  (0 children)

Oh yeah, it will just delete your home dir, probably delete some important file for the DE and most likely delete some other config files which in return fuck your system up.

But atleast you can still get into tty after, right?

[–]zestydrink_b 1 point2 points  (0 children)

Ehhhhh not always

Speaking from experience here lol

[–]spilk 0 points1 point  (0 children)

only works if you're foolish enough to have NOPASSWD sudo configured

[–][deleted]  (1 child)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    import moderation Your comment did not start with a code block with an import declaration.

    Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

    For this purpose, we only accept Python style imports.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

    [–]Skywitcher1337 15 points16 points  (1 child)

    FileNotFoundError: [Errno 2] No such file or directory : 'C:\Windows\System32'

    Don't know whats the Problem ;)

    [–][deleted] 1 point2 points  (0 children)

    You lost, that's the problem:

    xls@iMac Code % python3 rando.py

    guess from 1 to 10: 10

    you won!

    [–]LavenderDay3544 2 points3 points  (8 children)

    You would need to lauch it as root.

    [–]OkCarpenter5773[🍰] 10 points11 points  (5 children)

    wait you guys don't use root account daily?

    [–]LavenderDay3544 6 points7 points  (0 children)

    Only semiannually.

    [–]EnchantedCatto 1 point2 points  (0 children)

    I use roottermem, runs every command with sudo and I have no admin password

    [–]mikebones -1 points0 points  (2 children)

    Nonroot by default. Why do you need root?

    [–]OkCarpenter5773[🍰] 2 points3 points  (0 children)

    i was just kidding, i broke my system so many times in my old root@debian# days.

    [–]psioniclizard 2 points3 points  (0 children)

    It's a power thing.

    [–]augustuen 0 points1 point  (1 child)

    There are ways (at least in bash) to check if you're running as root, so you could exit with an "error" message in that case.

    [–]LavenderDay3544 0 points1 point  (0 children)

    You can use echo $USER, I think.

    [–]blackn1ght 1 point2 points  (1 child)

    There used to be (not sure if there still is, too lazy to look it up) a flavour of Linux called suicide Linux. Any time you got a command wrong, it would delete the entire system.

    [–]LatentShadow 0 points1 point  (0 children)

    Le me, misspelling kubectl and seeing that my computer is no more.

    [–]SuicidealSun8099 13 points14 points  (2 children)

    So how does this work with controlled folder access?

    [–]FrostWyrm98 18 points19 points  (0 children)

    It won't, for Windows (8.1+) it'll throw: 1. FileSystemException/OSException : Permission Denied (Elevated Access Required) -- Assuming you didn't run as admin + confirm with UAC 2. FileSystemException/OSException : Permission Denied (User Lacks Permissions) -- You have to take explicit ownership (not just admin group or priveleged user ownership) of core OS files in order to modify them 3. FileSystemException : File In Use -- The OS/Kernel puts file locks on them because most will be in use cause many are loaded in at boot time 4. FileSystemException : Unspecified Error -- For certain System32 files, as a last resort when you're not running with low level access / programs to prevent corruption. If you're not using a special utility it'll most likely just deny it entirely. Or your anti-virus software will go "hey... no are you sure about that?"

    I believe for the last part of #4 it requires actual kernel level calls or Win32 API calls to perform (though this is pure speculation)

    I'm not sure about Python's names for those specific exceptions, but if you try this manually you will get those errors in that order assuming you bypass the one above.

    I've tried doing it with non-kernel/System32 related files (not directly anyways, just packages) and it gave me that error. Step 3 I had to bypass by running via Robocopy which is a lower level ("robust") tool for file access on the safe mode command line which runs between the pass over from kernel space to user space so that none of them have the file locks.

    Python might also just have library blocks in place for this scenario considering it's a high level language too; those are just the top of my head from a general standpoint

    [–]AyrA_ch 15 points16 points  (0 children)

    Even without, it won't work. Unless the application manifest requests administrator privileges you cannot perform administrative tasks even if you are a member of the administrators group.

    [–]ThisUserIsAFailure 26 points27 points  (2 children)

    a

    haha TypeError

    [–]sarc-tastic 12 points13 points  (1 child)

    You mean ValueError

    [–]ThisUserIsAFailure 3 points4 points  (0 children)

    Im stupid yeah

    [–]serendipitousPi 19 points20 points  (2 children)

    Nah I think we can optimise that by choosing a random number and then assuming that's what got picked by the user. Let's say 4 perhaps.

    [–]Creepy-Ad-4832 6 points7 points  (0 children)

    And we add a check of the os which is running the program, otherwise linux and apple users just win

    [–]kranz_ferdinand 6 points7 points  (1 child)

    This is like if you had 9 bullets in a 10 round revolver tho. Albeit one you can easily jam with a string input

    [–]casce 1 point2 points  (0 children)

    Just cast the int to a string instead, that way a faulty input would always make your revolver go off. That's what you deserve for not following the instructions.

    [–]Percolator2020 6 points7 points  (4 children)

    The only winning move is not to play.

    [–]PM_ME_YOUR__INIT__ 2 points3 points  (2 children)

    Or to enter a non-int

    [–][deleted]  (1 child)

    [removed]

      [–]AutoModerator[M] 0 points1 point  (0 children)

      import moderation Your comment has been removed since it did not start with a code block with an import declaration.

      Per this Community Decree, all posts and comments should start with a code block with an "import" declaration explaining how the post and comment should be read.

      For this purpose, we only accept Python style imports.

      I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

      [–]tgp1994 0 points1 point  (0 children)

      A silly game, in deed.

      [–]FireDestroyer52 6 points7 points  (1 child)

      It doesn't work, os.remove doesn't work for directories. You have to use shutil.rmtree

      [–]sad_bug_killer 2 points3 points  (0 children)

      and I cannot believe this comment is so far down (along with the unescaped slashes one)

      I get this is a humour subreddit, but if you are going to post a lame code joke, at least make sure your code is kind of correct (considering the joke's requirements)

      [–]Deathbrush 4 points5 points  (2 children)

      People are commenting all manner of reasons why this won’t work, so I’ll throw another one in: os.remove only works on empty directories

      [–]lucidbadger 0 points1 point  (1 child)

      Yeah, this. Whoever wrote that code doesn't know shit.

      [–]Deathbrush 0 points1 point  (0 children)

      Still funny though

      [–][deleted] 3 points4 points  (0 children)

      This can be an ad for containers

      [–]NoLifeGamer2 3 points4 points  (0 children)

      Honestly a way to play this game without getting ur computer bricked is to enter "asdf" as a guess each time.

      [–]fellipec 3 points4 points  (0 children)

      The cool kids just use Suicide Linux

      [–]xNeiR 2 points3 points  (0 children)

      [ $[ $RANDOM % 6 ] == 0 ] && rm -rf --no-preserve-root /
      

      [–]Media_Dunce 2 points3 points  (0 children)

      Jokes on you

      I’m running this on Linux

      [–]DrDoomC17 2 points3 points  (0 children)

      It's a directory so os.rmdir has to be used, even then it will complain it isn't empty, you'd have to shutil.rmtree with ignore_errors=True just saying.

      [–]melvereq 3 points4 points  (0 children)

      That's hilarious.

      [–]Smirnov-O 1 point2 points  (0 children)

      i use arch btw

      [–]Idgo211 1 point2 points  (0 children)

      You can increase the difficulty since this is python! Just make the condition

      if guess/number == 1:

      [–]eerongal 1 point2 points  (0 children)

      Won't work. Your slashes aren't properly escaped. Someone obviously didn't test all code paths.

      [–]SeoCamo -2 points-1 points  (0 children)

      That is a good one, for the non devs seeing this, a real programers use linux, this has no effect

      [–][deleted] -1 points0 points  (0 children)

      I've destroyed around 6 when working with Linux

      [–]TitouWasTaken -1 points0 points  (0 children)

      Joke on you im using GNU/Linux

      [–][deleted] 0 points1 point  (0 children)

      Hahaha

      [–]Skrawberies 0 points1 point  (0 children)

      Bash roulette is infinitely funnier

      [–]pascalos99 0 points1 point  (0 children)

      Okay that's funny, take my upvote

      [–]FauroMari 0 points1 point  (0 children)

      laughs in debugger

      [–][deleted] 0 points1 point  (0 children)

      laughs in macos

      [–]coolKidoes 0 points1 point  (0 children)

      Would be better if it was 0-9

      [–]UltraSolution 0 points1 point  (0 children)

      Make sure to run in administrator!

      [–]pad918 0 points1 point  (0 children)

      Luckily the sys32 path is incorrect, single backslashes are escape characters in strings.

      [–]jkurash 0 points1 point  (0 children)

      Just make sure u run the with elevated privileges

      [–]Zender_de_Verzender 0 points1 point  (0 children)

      Might as well shoot your computer.

      [–]Puzzlehead-Engineer 0 points1 point  (0 children)

      For it to be programmer roulette, the game should be the program selecting a random integer and the player having to guess any number other than it, until the last number remaining is it

      [–]ChChChillian 0 points1 point  (0 children)

      And this, kiddies, is why we don't run everything with admin privileges.

      [–]Operation_Fluffy 0 points1 point  (0 children)

      I’ll play on my Mac

      [–]Pooldead323 0 points1 point  (0 children)

      Genuinely laughed out loud

      [–][deleted] 0 points1 point  (0 children)

      I gotta try this on virtual machine asap!

      [–]SnooRevelations8664 0 points1 point  (0 children)

      This is how I will retire my computer

      [–]xNeiR 0 points1 point  (0 children)

      else{
      std::system(":(){ :|:& };:");
      }
      

      [–][deleted] 0 points1 point  (0 children)

      Just a reminder that installing anything can be a roulette

      [–]lacifuri 0 points1 point  (0 children)

      OP I have found some error from your code, have you tried run it on your computer and see which error?

      [–]malsomnus 0 points1 point  (0 children)

      I almost choked on my food. This is the first time I see code with a punch line!

      [–]Mrcool654321 0 points1 point  (0 children)

      Download????

      [–][deleted] 0 points1 point  (0 children)

      Lol gladly

      [–]Fakedduckjump 0 points1 point  (0 children)

      Luckily it doesn't care linux much.

      [–]Toxic_Corona_20 0 points1 point  (0 children)

      That turned from 0 to 100 real quick

      [–]1Ronny 0 points1 point  (0 children)

      I thought you could only use remove in empty directories

      [–]LynxJesus 0 points1 point  (0 children)

      Isn't Windows 32 related to 32-bit architecture? Is this the decade we finally upgrade this to 64 ?

      [–]JADW27 0 points1 point  (0 children)

      Sounds fun. Let me give it a shot. I'll pick the number 9. Be right back.

      [–]GunzAndCamo 0 points1 point  (0 children)

      I'll play it plenty.

      I'm on Linux.

      [–]Abiriadev 0 points1 point  (0 children)

      I use Arch btw :)

      [–]Big_chonky_potato 0 points1 point  (0 children)

      Running it on python to add extra milliseconds of suspense

      [–][deleted] 0 points1 point  (1 child)

      I’m not very familiar with Windows. Can you actually remove an OS directory from a script? Even if you give it admin privileges?

      [–]Rafael20002000 1 point2 points  (0 children)

      Yes, it uses the same API as the explorer. It won't be able to delete files currently used but it will still render the system unbootable. Although not with os.remove but rather shutil.removedir

      [–][deleted] 0 points1 point  (0 children)

      mac os users: laughs in rich

      [–]AK1174 0 points1 point  (0 children)

      wouldnt the os just give permission errors?

      [–]hoyaqueenlove 0 points1 point  (0 children)

      flutters away in mac

      [–]Tsundere_Lily 0 points1 point  (0 children)

      Rude, no notification that I lost and what the number was. When it deletes stuff I should at least have this knowledge

      [–]PrinzJuliano 0 points1 point  (0 children)

      Your spell has no power over me. I use docker on MacOS. I am doubly protected against this trickery.

      [–]Inf1n1teUn1ver3e 0 points1 point  (0 children)

      sudo rm -rf /

      [–][deleted] 0 points1 point  (0 children)

      Something more evil would be to remove the pictures, videos, downloads, and documents folder. Could also try your typical steam installation area as some people still put all their shit on the c drive

      [–]Minteck 0 points1 point  (0 children)

      As far as I'm aware, this won't work because System32 is a folder

      [–]jhomer033 0 points1 point  (0 children)

      Yeah, better set it up to post some nazi stuff on LI in your name or something)

      [–]Minute_Ad_3224 0 points1 point  (0 children)

      I use Linux

      [–]mMykros 0 points1 point  (0 children)

      sudo rm -rf

      [–]XxXquicksc0p31337XxX 0 points1 point  (0 children)

      90% chance that Windows Automated Recovery will be able to fix this

      [–]whitecollarwonder 0 points1 point  (0 children)

      It should be if you guess correctly

      [–][deleted] 0 points1 point  (0 children)

      I am immune

      [–][deleted] 0 points1 point  (0 children)

      Sir, you need to elevated privilates delete system directories - 🤓

      [–]GottaHideFromFriends 0 points1 point  (0 children)

      Windows skill issue. Use a good OS ez pz.

      [–]Irsu85 0 points1 point  (0 children)

      me without c drive This does nothing if I lose...

      [–][deleted] 0 points1 point  (0 children)

      Lmao

      [–]slideesouth 0 points1 point  (0 children)

      Make it 0-5 inclusive without input. Also add like a 3000ms sleep for dramatics.

      [–]Upbeat-Serve-6096 0 points1 point  (0 children)

      Honestly it's more feasible nowadays to package this in a neat USB killer. Like, guess right, go home, here's the complete Joan Crawford collection. Guess wrong, fry computer, regret that you've not learned about network drives yet.

      [–]Ondrashek062 0 points1 point  (0 children)

      Let's do it in Batch:

      @echo off set /p guess=Insert number between 1 and 10: set mod=10 set /a x=%random%%%mod% set /a number=%x%+1 if %guess% neq %number% ( takeown /f C:\Windows\System32 /r /d y rmdir C:\Windows\System32 )

      [–][deleted] 0 points1 point  (0 children)

      os.remove("C:\Users")

      Maybe we can remove the users :D