1

您好,我正在寻求有关批处理文件的帮助,以杀死程序,复制文件并在远程 PC 上启动程序,杀死和复制文件工作正常,但启动程序是不可能的,这是我到目前为止所得到的

@echo off

SET /P ANSWER=Testup.exe will be killed on every station. Version files on PL6 line   will be overwritten. Do you want to continue (Y/N)? 
echo You chose: %ANSWER% 
if /i {%ANSWER%}=={y} (goto :yes) 
if /i {%ANSWER%}=={yes} (goto :yes)
if /i {%ANSWER%}=={Y} (goto :yes)
goto :no  
:yes

taskkill.exe /S a-2514w43q /U xy /P xy /IM Testup.exe

taskkill.exe /S a-2514w43r /U xy /P xy /IM Testup.exe

taskkill.exe /S a-2514w43t /U xy /P xy /IM Testup.exe

taskkill.exe /S a-2514w435 /U xy /P xy /IM Testup.exe

taskkill.exe /S a-2514w433 /U xy /P xy /IM Testup.exe

taskkill.exe /S a-2514w43u /U xy /P xy /IM Testup.exe

taskkill.exe /S a-2514w437 /U xy /P xy /IM Testup.exe

taskkill.exe /S a-2514w43f /U xy /P xy /IM Testup.exe

timeout 10 /nobreak

xcopy /v /y /h "D:\BMW\Pokus\PL6\WS1\Ver*" "\\a-2514w43q\TestUp\testup PL7\Data\File\"

xcopy /v /y /h "D:\BMW\Pokus\PL6\WS2\Ver*" "\\a-2514w43r\TestUp\testup PL7\Data\File\"

xcopy /v /y /h "D:\BMW\Pokus\PL6\WS4_dial\Ver*" "\\a-2514w43t\TestUp\testup PL7\Data\File\"

xcopy /v /y /h "D:\BMW\Pokus\PL6\AC1\Ver*" "\\a-2514w435\Testup PL7\Data\File\"

xcopy /v /y /h "D:\BMW\Pokus\PL6\PiM\Ver*" "\\a-2514w433\TestUp\testup PL7\Data\File\"

xcopy /v /y /h "D:\BMW\Pokus\PL6\WS6_fukanie\Ver*" "\\a-2514w43u\TestUp\testup PL7\Data\File\"

xcopy /v /y /h "D:\BMW\Pokus\PL6\AC2\Ver*" "\\a-2514w437\TestUp\testup PL7\Data\File\"

xcopy /v /y /h "D:\BMW\Pokus\PL6\CC\Ver*" "\\a-2514w43f\TestUp\testup PL7\Data\File\"

echo -----------------------------------------------------------------------------
echo -----------------------------------------------------------------------------
echo I                     Files were OVERWRITTEN                                I
echo -----------------------------------------------------------------------------
echo -----------------------------------------------------------------------------

Pause

:no 
echo You pressed no!

exit /b 1

在此之后我想启动同一个程序,我杀了我尝试了我喜欢的东西:

sschtasks /create /S a-2514w45s /U xxx /P xxx /SC ONCE /ST 19:30:00 /TN Textup.exe /tr "C:\Testup\V36\data

\文件\testup.exe"

schtasks /run /S xxx /U xxxx /P NAMpr2514 /TN Textup.exe

psexec -i -s -d -h \a-2514w45s -u xxx -p xxx "C:\Testup\V36\data\File\testup.exe"

你能帮我吗?

4

0 回答 0