This article mainly introduced the Bat batch processing realizes the automatic installation software function, this article directly gives the code example,, needs the friend to be possible to refer to under
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19-20 |
The CLS @echo off Echo. echo Installation Diskeeper 7.0.428 echo Please wait a moment ... start/wait%systemdrive%installapplicationsdiskeepersetup.exe/s/v/qn echo. echo Update Diskeeper 7.0.428 to 7.0.430 Echo Please wait a moment ... start/wait%systemdrive%installapplicationsdiskeeperus_dk70_wup_ build430.exe/s/v/qn ECHO. echo installation Flashget 1.4 echo Please wait a moment ... start/wait%systemdrive%installapplicationsflashgetfgf140.exe/s echo. echo Installation Symantec Antivirus Corporate 8.1 echo Please wait a moment ... start/wait%systemdrive%installapplicationssavsav810b821.exe/qn ECH O. EXIT |
Enter with Notepad and save as *.bat. The specific path changes itself, each empty row is a separate one. If in DOS, the variable only use%, for batch processing, it is necessary to use%.
Special NOTE: "Installing Windows Patches" is a bit of a problem because there are two types of Windows patches, one is a simple executable file, there is no icon, the other is an icon, so instead of a different batch (the/R parameter representation includes a subfolder). "_sfx_cab_exe_path" is a feature string, about feature strings: You can use Notepad to open two different patches to find two different characters, possibly with FC commands.
?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
for/r%%f in (*.exe) do @ (@findstr _sfx_cab_exe_path%%) F ">nul && @start/wait%%f/u/q/z) | | @start/wait%%f/q) QChain.exe ECHO is installing Windows patches, please wait ... cd e:hotfix for%a in (*.exe) do start/wait-Q q Chain.exe ECHO. Echo is installing MSN Messenger 6.0, please wait a moment ... start/wait e:softwaremessengermsnmsgs.msi/qb echo. Echo is installing DirectX 9.0b, please wait a moment ... start/wait e:softwaredx9dxsetup.exe/install/silent echo. Echo is installing Windows Media Player 9, please wait a moment ... start/wait e:softwarewmp9xp.exe/q:a/r:n echo. Echo is installing Movie Maker 2.0, please wait a moment ... start/wait e:softwarewmm2mm20.msi/qn echo. ECHO is installing the. NET Framework v1.1, please wait ... start/wait E:SOFTWARENETFRAMEWORKNETFX.MSI/QB ECHO. Echo is installing Microsoft JAVAVM, please wait ... start/wait e:softwaremsjavwu.exe/q:a/r:n echo. Echo is installing isobuster, please wait ... regedit/s e:softwareisobuster.reg start/wait e:softwareisobuster.exe/verysilent Echo. ECHO is installing Ad-aware 6, please wait a moment ... start/wait e:softwareadaware.exe/s echo. Echo is installing Winamp, please wait ... start/wait e:softwarewinamp.exe/s echo. echo is installing Adobe Reader 6, please wait ... start/wait e:softwareadberdr60.exe-p "-s/v"/qn "echo. ECHO is installing Nero burning ROM 6, please wait a moment ... regedit/s e:softwarenero.reg start/wait e:softwarenero6009.exe/silent/noreboot ECHO. Echo is installing WinRAR, please wait ... start/wait e:softwarewrar320.exe/s echo. Echo is installing Flashget, please wait ... start/wait e:softwareflashget.exe/s echo. Echo is installing Symantec Antivirus Corporate 8.1, please wait a moment ... start/wait e:softwarenav81chs.exe/qn echo. ECHO is installing ZoneAlarm free, please wait ... start/wait e:softwarezonealarm.exe/s/noreboot |