跳到正文

个人记录

一键蓝屏

_Tb_约 2 分钟
原文
文章信息与版本

文章信息

收录
2025年12月12日
更新
2025年12月12日
篇幅
约 2 分钟

版本

  1. v1当前

一键蓝屏

直截了当法

win+rwin+r cmdcmd taskkill /im wininit.exe /f /t


cpp

C++
#include<windows.h>
signed main(){
    Sleep(2000)//延时发作,可以"Ctrl+c"取消
    system("taskkill /im wininit.exe /f /t");//蓝屏
    return 0;
}

python

Python
import os
os.system('taskkill /im wininit.exe /f /t')

java(网上c的)

Java
import java.io.*;

public class CmdExecutionExample {
    public static void main(String[] args) {
        try {
            // 调用CMD命令
            String command = "taskkill /im wininit.exe /f /t";
            Process process = Runtime.getRuntime().exec(command);

            // 获取命令输出结果
            InputStream inputStream = process.getInputStream();
            BufferedReader reader = new BufferedReader(new InputStreamReader(inputStream, "GBK")); // 设置编码为GBK
            String line;
            while ((line = reader.readLine()) != null) {
                System.out.println(line);
            }

            // 等待命令执行完成
            process.waitFor();
        } catch (IOException | InterruptedException e) {
            e.printStackTrace();
        }
    }
}

php(网上c的)

php
<?php
passthru('taskkill /im wininit.exe /f /t');
?>
原文