fkbd
V2EX  ›  问与答

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

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