Deploy Software at Login

By adding
one command to your user’s login file and running the below batch file,
you can install many applications when users login.

The proper command is:

start /d\ServerPath filename.bat

MS reference to using Start command is found at:

http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/start.mspx?mfr=true

My sample file was used to install .NET 3.5 as a prerequisite to a major software roll out.

REM By adding one command to your user's login file and running the below batch file, you can install many applications when users login.  

REM The proper command is:

REM start /d\ServerPath filename.bat

REM MS reference to using Start command is found at:

REM http://www.microsoft.com/resources/documentation/windows/xp/all/proddocs/en-us/start.mspx?mfr=true

REM The sample below was used to install .NET 3.5 as a prerequisite to a major software roll out.


REM Prevent each command from being echoed to the screen - very annoying otherwise
@echo off

REM Check to see if batch file was previously run by looking for dropped file (dropped at end of batch)
REM This sample uses deploy.txt for the dropped file
If exist c:deploy.txt goto done

REM Clear the DOS Box and display detailed message for End User
REM Explain what is being installed and why
REM Give expected duration of install
REM Include any instructions that the end user needs to know about.
CLS
echo.
echo.
echo.
echo.
echo.
echo.
echo Installing Required components .....
echo You can continue working during the installation (it takes about ....).
echo.
echo.
echo Do NOT close this box until prompted, otherwise the installation will run again the next time that you login to the network.
echo.
echo.
echo.
echo If you have any questions, please contact ...
echo.
echo.

REM Place your install command here
REM Below is my command for installing .NET 3.5
\ServernameNETLOGONdotnetdotnetfx35setup.exe /q /norestart

REM Drop a file in the root directory so that the batch file does not run repeatedly at login
REM Include install results in dropped file
echo %COMPUTERNAME% >>c:deploy.txt
date /T >>c:deploy.txt
time /T >>c:deploy.txt
echo .net35 SP1 installed >>c:deploy.txt

REM Copy file to network share to track install by machine
REM Remember to rename file to Computer Name on copy - easy identification
REM Change drive:path to the network share
copy c:deploy.txt drive:path%COMPUTERNAME%.txt /y

REM Inform User that install is complete - Give follow-up instructions if needed
cls
echo The installation is now complete. You may close this window at any time.
echo.
echo.
echo.

REM clean up and exit
goto exit
:done
REM nothing to do
:exit

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.