Install at Log OnThis script allows you to install many applications when users log in. The sample below is for the .NET Framework version 3.5
Added 338 days ago by Emnico
| Download | |
| Review | ||
| Back | ||
| 186 | Views |
Source code
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\\Server\Path 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 \\Servername\NETLOGON\dotnet\dotnetfx35setup.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

