fkbd
V2EX  ›  问与答

如何用 c++一键关闭所有开着的浏览器呢?

  •  
  •   fkbd · Feb 10, 2016 · 2415 views
    This topic created in 3746 days ago, the information mentioned may be changed or developed.
    4 replies    2016-02-10 17:45:50 +08:00
    wbsdty331
        1
    wbsdty331  
       Feb 10, 2016   ❤️ 1
    所有浏览器进程都得有一遍吧
    firefox.exe
    chrome.exe
    iexplore.exe
    opera.exe
    还有更多
    ebony0319
        2
    ebony0319  
       Feb 10, 2016 via Android   ❤️ 1
    shutdown -s -t 0
    htfy96
        3
    htfy96  
       Feb 10, 2016   ❤️ 1
    #include <cstdlib>
    std::system("taskkill /f firefox.exe"); //大概是这样?查一下 taskkill 语法然后补全浏览器进程名
    std::system("killall firefox"); //linux, killall 命令不是每个发行版都有,调内核太麻烦了
    rootsir
        4
    rootsir  
       Feb 10, 2016
    shutdown -s -f -t 1
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5814 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 55ms · UTC 01:55 · PVG 09:55 · LAX 18:55 · JFK 21:55
    ♥ Do have faith in what you're doing.