Hello,

I deploy differents software with a batch file.

For example Matlab i use this batch file :

@echo off
xcopy /R /Y license.dat "C:\"
REM Main Install
setup.exe -inputFile installer_input.txt -activationPropertiesFile activate.ini
REM Licensing
xcopy /R /Y license.dat "C:\Program Files\MATLAB\R2013A\"
exit /B %EXIT_CODE%

Deployment is ok but when i check c:\ProgramData\Dell\KACE\downloads, installation files is present.

I have test tick the box "delete download files", but files is deleted before the software is install. 

Have you a "best practices" or a solution for delete download files?

Thanks for your reply

Regards

0 Comments   [ + ] Show Comments

Comments

Please log in to comment

Community Chosen Answer

2

kinda makes sense, the script is doing it's cleanup as soon as the batch file finishes running.  It does not care about the setup.exe running since it did not launch it.

you can try to put "start /wait's" in front of the exe calls to keep the batch file open and in sequence or just do away with the batch and call the exe's from the script directly in the task steps.

@echo off
start /wait xcopy /R /Y license.dat "C:\"
REM Main Install
start /wait setup.exe -inputFile installer_input.txt -activationPropertiesFile activate.ini
REM Licensing
start /wait xcopy /R /Y license.dat "C:\Program Files\MATLAB\R2013A\"
exit /B %EXIT_CODE%

@echo off
xcopy /R /Y license.dat "C:\"
REM Main Install
setup.exe -inputFile installer_input.txt -activationPropertiesFile activate.ini
REM Licensing
xcopy /R /Y license.dat "C:\Program Files\MATLAB\R2013A\"
exit /B %EXIT_CODE% - See more at: http://www.itninja.com/question/deploy-manually-software-with-a-batch-file#sthash.5FZPGOoQ.dpuf
@echo off
xcopy /R /Y license.dat "C:\"
REM Main Install
setup.exe -inputFile installer_input.txt -activationPropertiesFile activate.ini
REM Licensing
xcopy /R /Y license.dat "C:\Program Files\MATLAB\R2013A\"
exit /B %EXIT_CODE% - See more at: http://www.itninja.com/question/deploy-manually-software-with-a-batch-file#sthash.5FZPGOoQ.dpuf
@echo off
xcopy /R /Y license.dat "C:\"
REM Main Install
setup.exe -inputFile installer_input.txt -activationPropertiesFile activate.ini
REM Licensing
xcopy /R /Y license.dat "C:\Program Files\MATLAB\R2013A\"
exit /B %EXIT_CODE% - See more at: http://www.itninja.com/question/deploy-manually-software-with-a-batch-file#sthash.5FZPGOoQ.dpuf
Answered 10/11/2013 by: SMal.tmcc
Red Belt

Please log in to comment

Answers

0

Hello, thanks for your reply, i have test with start /wait but setup.exe launch multiple executables.

Have you a solution for delete downloaded files on client?(for example after install, with a script)


Thanks

Answered 10/14/2013 by: gjoubert
Purple Belt

  • Can you break apart the multiple installs that are executed by SETUP.EXE and run them yourself? hat would be a better method, so as to control the various components that are installed.
Please log in to comment
0

It's complicate to break apart the multiple install.

When i look other manually deploy expample with kace 1000, the box for "delete download files on the client" is not tick. It is possible the agent auto delete file ? (after a time)

Answered 10/14/2013 by: gjoubert
Purple Belt

  • You can create a cleanup kscript to do that. have it look for the existence of some file in temp area and run a del command. You can push that to a label of machines that have MATLAB installed on them. Since the update in inventory after an install is not immediate that should work fine.
Please log in to comment
0

I would suggest a variation on a couple of the suggestions that have come forth already.  First of all, have you installation process (within the script or elsewhere) place a "cleanup script" in the temp directory.  In the main installation script, use a CALL command to invoke the cleanup script as its last step.  In the cleanup script, place a short duration delay as the first step (to be sure Windows has closed the primary script file) and then delete the primary script file.  Normal, periodic cleanup of the temp directory will take care of the cleanup script over time (yes, you should be doing temp directory cleanup as a best practice!).

Answered 10/22/2013 by: EDSlayer
White Belt

Please log in to comment
Answer this question or Comment on this question for clarity