How to make a program that, once closed, opens another window?
willowblanket (1)

So, I'm trying to make a program that, once closed, opens another window of itself, so it never stops unless shut down by task manager or unless the computer itself is shut down, of course. This is just to prank a friend, so no maliciousness. I want to to do this in Python, but if there are any other languages that can help me do this more efficiently, please let me know. I'm a beginning programming student, so I kinda need explanations/answers to be simple. Thanks in advance for your help!

You are viewing a single comment. View All
rediar (101)

make a windows batch file.

@echo off
shutdown/s

will shut down their computer when the file is run. Please upvote if this was helpful!

ash15khng (393)

@rediar This wouldn't work on Mac and Linux, but I have an alternative:

sudo shutdown -h <time in minutes>

Sadly this needs their password because it doesn't work unless you're the root user or something like that.

rediar (101)

@ash15khng Yeah, thats the problem. It works well for Windows though, obviously.