注意事項:預設瀏覽器為 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
沒有留言:
張貼留言