/build/static/layout/Breadcrumb_cap_w.png

Deploy manually software with a batch file

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

Answers (4)

Posted by: SMal.tmcc 10 years ago
Red Belt
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
Posted by: gjoubert 10 years ago
Blue Belt
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


Comments:
  • 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. - vjaneczko 10 years ago
Posted by: gjoubert 10 years ago
Blue Belt
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)


Comments:
  • 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. - SMal.tmcc 10 years ago
Posted by: EDSlayer 10 years ago
White Belt
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!).

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

View more:

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ