Resume batch script after computer restart

前端 未结 4 883
迷失自我
迷失自我 2021-01-01 07:21

I have a bunch of old machines running Windows 2000 Pro and IE 5.0 which I want to upgrade to IE 6 with Silverlight. I downloaded the IE6 and Silverlight installers from Mi

4条回答
  •  粉色の甜心
    2021-01-01 07:51

    I know its a bit old but this works amazingly:

    @echo off
    call :Resume
    goto %current%
    goto :eof
    
    :one
    echo two >>myfile.cmd
    ::REBOOT HERE
    goto :eof
    
    :two
    echo resumed here
    goto :eof
    
    :resume
    rem THIS PART SHOULD BE AT THE BOTTOM OF THE FILE
    set current=one
    

提交回复
热议问题