1

Hello there I am looking for help with batch file to kill program, copy files and starting program on remote PCs, killing and copying files is working correctly but starting program is impossible here is what I got so far

@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

and after this I want to start the same program, which I killed I tried what I could like :

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

\File\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"

can u help me?

0 Answers0