標籤

BAT (38) shell (34) Virtual Machine (33) Xubuntu (29) acfs (25) PHP (24) CentOS (21) Virtul Box (20) 編輯器 (17) 資料庫 (15) lubuntu (13) windows (13) CPP (12) ubuntu (12) chrome (11) laravel (10) Docker (9) Python (9) 5A88 (7) VMware (6) 資料結構 (6) Javascript (5) Node (5) Proxmox VE (5) 公告系統 (5) 程式積木 (5) Android Studio (4) ANN (3) OB2D2016x64 (3) Xoops (3) clonezilla (3) samba (3) 公文 (3) 其他 (3) 硬體 (3) API (2) Android (2) AppInvent2 (2) Html (2) Hyper-V (2) Nas (2) botnet (2) mbot (2) swift (2) wordpress (2) 樣板 (2) 防火牆 (2) AD的應用 (1) Ansible (1) Arduino (1) CSS (1) GitLab (1) HA Proxy (1) LegoEV3 (1) PowerShell (1) Scratch (1) VM (1) XenServer (1) kotlin (1) linuxmint (1) lxc (1)

2019年10月21日 星期一

利用bat一鍵下載OpenOffice後安裝

使用Cloud School 需使用 Apache的 OpenOffice。
注意事項:預設瀏覽器為 Chrome

如何一鍵下載OpenOffice後安裝
檔名 OpenOffice_Install.bat
下載->解壓縮->進入資料夾,對OpenOffice_Install.bat 點兩下->一鍵下載OpenOffice後安裝

@echo off

if "%PROCESSOR_ARCHITECTURE%" == "x86" goto x86
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto x64

:x86
echo "您的OS 是x86"
start "C:\Program Files\Google\Chrome\Application\chrome.exe" https://sourceforge.net/projects/openofficeorg.mirror/files/4.1.7/binaries/zh-TW/Apache_OpenOffice_4.1.7_Win_x86_install_zh-TW.exe/download
echo "等待下載完成後,按下任意鍵,進行安裝程序"
pause
set driver01=%~dp0Apache_OpenOffice_4.1.7_Win_x86_install_zh-TW.exe
echo %driver01%
start /wait %driver01% /S /v/qn
echo "Install Apache_OpenOffice_4.1.7_Win_x86_install_zh-TW OK"
pause
exit

:x64
echo "您的OS 是x64"
start "C:\Program Files (x86)\Google\Chrome\Application\chrome.exe" https://sourceforge.net/projects/openofficeorg.mirror/files/4.1.7/binaries/zh-TW/Apache_OpenOffice_4.1.7_Win_x86_install_zh-TW.exe/download
echo "等待下載完成後,按下任意鍵,進行安裝程序"
pause
set driver01=%~dp0Apache_OpenOffice_4.1.7_Win_x86_install_zh-TW.exe
echo %driver01%
start /wait %driver01% /S /v/qn
echo "Install Apache_OpenOffice_4.1.7_Win_x86_install_zh-TW OK"
pause
exit

      後來發現,這樣需要兩項關鍵:
              1.預設瀏覽器為chrome
              2.等待下載。

       所以決定將Apache_OpenOffice_4.1.7_Win_x86_install_zh-TW.exe 跟 OpenOffice_Install.bat
包在一起成ApacheOpenOffice.rar

       需做更改的檔名Apache_OpenOffice_4.1.7_Win_x86_install_zh-TW.exe 改為
Apache_OpenOffice_417_Win_x86_install_zh-TW.exe

OpenOffice_Install.bat 內容修改為

@echo off

if "%PROCESSOR_ARCHITECTURE%" == "x86" goto x86
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto x64

:x86
echo "您的OS 是x86"
set driver01=%~dp0ApacheOpenOffice\Apache_OpenOffice_417_Win_x86_install_zh-TW.exe
echo %driver01%
start /wait %driver01% /S /v/qn
echo "Install Apache_OpenOffice_4.1.7_Win_x86_install_zh-TW OK"
pause
exit

:x64
echo "您的OS 是x64"
set driver01=%~dp0ApacheOpenOffice\Apache_OpenOffice_417_Win_x86_install_zh-TW.exe
echo %driver01%
start /wait %driver01% /S /v/qn
echo "Install Apache_OpenOffice_4.1.7_Win_x86_install_zh-TW OK"
pause
exit

       目前嘗試後的結果,發現可以用在電腦教室安裝軟體,可以節省大量時間,不用等按下[下一步],就可以完成安裝。
下一篇

沒有留言:

張貼留言

在 Windows 10 x64 1909版,使用BAT快速安裝公文系統與人事服務網(自然人憑證)版

相關內容移往 https://skjhcreator.blogspot.com/2021/02/windows-10-x64-1909bat.html