c517718004
V2EX  ›  问与答

bat 脚本求教

  •  
  •   c517718004 · Apr 30, 2017 · 1329 views
    This topic created in 3308 days ago, the information mentioned may be changed or developed.

    set _php_file="e:\webroot\cms\redis.php"

    setlocal enabledelayedexpansion

    下面这个可以正确执行

    wmic process where name="php.exe" get processId,commandLine

    修改成报错

    for /f "tokens=1,2" %%a in ('wmic process where name="php.exe" get commandLine^,processId ^| findstr /i %_php_file%') do (

    echo %%a
    
    echo %%a>>%~dp0keep.txt
    

    )

    需要如何修改

    No Comments Yet
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   4404 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 38ms · UTC 00:11 · PVG 08:11 · LAX 17:11 · JFK 20:11
    ♥ Do have faith in what you're doing.