本篇是為了快速安裝快速安裝派發彰化縣公文的文書組用的主機。在原本的快速安裝公文系統基礎上,再加裝OEMSCHCG_Client。但是OEMSCHCG_Client需在.NetFramework v4.0安裝完成後,才能啟動。因此需要判別系統是否安裝.NetFramework v4.0。
適用系統:Win 7 與 Win10
影片教學與測試
檔案下載 解壓密碼:demo1234
檔案名稱:安裝彰化縣公文文書機.BAT
檔案內容:
@echo off
REM ----------------以下為設定檔-可修改-----------------
REM ----------------以下為讀卡機驅動程式----------------
set driver01_86=%~dp0AutoInstall\EZ100_Driver_32bit.exe
set driver01_64=%~dp0AutoInstall\EZ100_Driver_64bit.exe
REM ----------------以下為筆硯公文系統----------------
set driver02=%~dp0AutoInstall\docNinstall.msi
set driver03=%~dp0AutoInstall\docNcomp42@0_13a42.msi
REM ----以下為內政部HiCOS卡片管理工具ver3.0.3.62814----
set driver04=%~dp0AutoInstall\HiCOS_Client.exe
REM ----------------以下為公文電子交換服務系統----------------
REM ----------------以下為設定檔-可修改-----------------
REM ----------------以下為讀卡機驅動程式----------------
set driver01_86=%~dp0AutoInstall\EZ100_Driver_32bit.exe
set driver01_64=%~dp0AutoInstall\EZ100_Driver_64bit.exe
REM ----------------以下為筆硯公文系統----------------
set driver02=%~dp0AutoInstall\docNinstall.msi
set driver03=%~dp0AutoInstall\docNcomp42@0_13a42.msi
REM ----以下為內政部HiCOS卡片管理工具ver3.0.3.62814----
set driver04=%~dp0AutoInstall\HiCOS_Client.exe
REM ----------------以下為公文電子交換服務系統----------------
set driver05=%~dp0AutoInstall\OEMSCHCG_Client_Setup.exe
set driver06=%~dp0AutoInstall\OEMSCHCG_Client_Setup_withDotNet45.exe
REM ----------------以下為IE啟動網頁----------------
set homepage01=http://gdms.chcg.gov.tw/
set homepage02=http://oems.chcg.gov.tw/\0
set homepage01=http://gdms.chcg.gov.tw/
set homepage02=http://oems.chcg.gov.tw/\0
set homepage03=https://edit.chcg.gov.tw/kw/\0
set homepage04=http://172.20.3.50/httpweb/admin/public/login.asp\0
REM ----------------以下為程式碼-不可修改---------------------------
echo "確認MOICA內政部憑證管理程式安裝狀況"
set homepage04=http://172.20.3.50/httpweb/admin/public/login.asp\0
REM ----------------以下為程式碼-不可修改---------------------------
echo "確認MOICA內政部憑證管理程式安裝狀況"
if exist "C:\Program Files (x86)\Chunghwa Telecom" (
@echo 安裝MOICA內政部憑證管理程式所在路徑為 %driver04%
"%driver04%" /quiet /norestart
@echo "安裝MOICA內政部憑證管理程式 OK"
) else (
@echo "已安裝MOICA內政部憑證管理程式"
)
@echo 安裝MOICA內政部憑證管理程式所在路徑為 %driver04%
"%driver04%" /quiet /norestart
@echo "安裝MOICA內政部憑證管理程式 OK"
) else (
@echo "已安裝MOICA內政部憑證管理程式"
)
set IEpath=HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
echo 設置首頁索引標籤
@reg add "%IEpath%" /v "Start Page" /t REG_SZ /d "%homepage01%" /f
@reg add "%IEpath%" /v "Secondary Start Pages" /t REG_MULTI_SZ /d "%homepage02%%homepage03%%homepage04%" /f
echo 設置首頁索引標籤
@reg add "%IEpath%" /v "Start Page" /t REG_SZ /d "%homepage01%" /f
@reg add "%IEpath%" /v "Secondary Start Pages" /t REG_MULTI_SZ /d "%homepage02%%homepage03%%homepage04%" /f
echo 設置首頁索引標籤 OK
echo "設定安全區域ActiveX控制項...."
set bl=2
set regpath=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\%bl%
echo 正在進行ActiveX的配置,請稍候...
@reg add "%regpath%" /v "1001" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1004" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1201" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1206" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "1207" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1208" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1209" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "120A" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "120B" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "120C" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1402" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1405" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1406" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "1407" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "1408" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1409" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "140A" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "140C" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1601" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1604" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1605" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1606" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1607" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "1608" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1609" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "160A" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "160B" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1802" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1803" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1804" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "1806" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "1809" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1812" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1A00" /d "131072" /t REG_DWORD /f
@reg add "%regpath%" /v "1A02" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1A03" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1A04" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "1A05" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "1A06" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1A10" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "1C00" /d "65536" /t REG_DWORD /f
@reg add "%regpath%" /v "2000" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2001" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2004" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2005" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2007" /d "65536" /t REG_DWORD /f
@reg add "%regpath%" /v "2100" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2101" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2102" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2103" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2104" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2105" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2106" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2107" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2108" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2200" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2201" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2300" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "2301" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2302" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2400" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2401" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2402" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2500" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2600" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2700" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2701" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2702" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2703" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2704" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2707" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2708" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2709" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "270B" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "270C" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "270D" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "CurrentLevel" /d "0" /t REG_DWORD /f
@reg add "HKCU\Software\Microsoft\Internet Explorer\New Windows" /v "PopupMgr" /t REG_DWORD /d "0" /f
@reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "SyncMode5" /t REG_DWORD /d "3" /f
echo "設定安全區域ActiveX控制項OK!!"
@echo 設定信任網站清單
regedit.exe /s "%~dp0AutoInstall\信任網站清單.reg"
@echo -------------------------------------------------------------------------------
@echo 設定完成
@echo -------------------------------------------------------------------------------
copy "%~dp0AutoInstall\公文整合資訊系統.url" "%USERPROFILE%\desktop"
@echo 捷徑複製完成
echo 安裝筆硯安裝程式所在路徑為 %driver02%
msiexec /package %driver02% /quiet /norestart
echo 安裝筆硯安裝程式所在路徑為 %driver03%
msiexec /package %driver03% /quiet /norestart
echo "安裝筆硯安裝程式 OK"
echo "設定安全區域ActiveX控制項...."
set bl=2
set regpath=HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\Zones\%bl%
echo 正在進行ActiveX的配置,請稍候...
@reg add "%regpath%" /v "1001" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1004" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1201" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1206" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "1207" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1208" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1209" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "120A" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "120B" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "120C" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1402" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1405" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1406" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "1407" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "1408" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1409" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "140A" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "140C" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1601" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1604" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1605" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1606" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1607" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "1608" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1609" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "160A" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "160B" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1802" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1803" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1804" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "1806" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "1809" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1812" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1A00" /d "131072" /t REG_DWORD /f
@reg add "%regpath%" /v "1A02" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1A03" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1A04" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "1A05" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "1A06" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1A10" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "1C00" /d "65536" /t REG_DWORD /f
@reg add "%regpath%" /v "2000" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2001" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2004" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2005" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2007" /d "65536" /t REG_DWORD /f
@reg add "%regpath%" /v "2100" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2101" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2102" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2103" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2104" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2105" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2106" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2107" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2108" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2200" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2201" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2300" /d "1" /t REG_DWORD /f
@reg add "%regpath%" /v "2301" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2302" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2400" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2401" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2402" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2500" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2600" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2700" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2701" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2702" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2703" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2704" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2707" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2708" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2709" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "270B" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "270C" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "270D" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "CurrentLevel" /d "0" /t REG_DWORD /f
@reg add "HKCU\Software\Microsoft\Internet Explorer\New Windows" /v "PopupMgr" /t REG_DWORD /d "0" /f
@reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Internet Settings" /v "SyncMode5" /t REG_DWORD /d "3" /f
echo "設定安全區域ActiveX控制項OK!!"
@echo 設定信任網站清單
regedit.exe /s "%~dp0AutoInstall\信任網站清單.reg"
@echo -------------------------------------------------------------------------------
@echo 設定完成
@echo -------------------------------------------------------------------------------
copy "%~dp0AutoInstall\公文整合資訊系統.url" "%USERPROFILE%\desktop"
@echo 捷徑複製完成
echo 安裝筆硯安裝程式所在路徑為 %driver02%
msiexec /package %driver02% /quiet /norestart
echo 安裝筆硯安裝程式所在路徑為 %driver03%
msiexec /package %driver03% /quiet /norestart
echo "安裝筆硯安裝程式 OK"
echo "安裝公文電子交換服務系統"
set regPath4="HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\.NETFramework\policy\v4.0"
reg QUERY %regPath4%>nul 2>nul&& set varNf4=1 || set varNf4=0
if %varNf4% == 1 (
echo ".NETFramework v4.0 is installed."
start /wait %driver05% /S
) else (
echo ".NETFramework v4.0 is not installed."
start /wait %driver06% /S
)
echo "安裝公文電子交換服務系統OK"
if "%PROCESSOR_ARCHITECTURE%" == "x86" goto x86
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto x64
rem 針對win10有32跟64位元的判斷
:x86
echo "x86"
echo 安裝讀卡機驅動程式所在路徑為 %driver01_86%
start /wait %driver01_86% /S /v/qn
echo "安裝讀卡機驅動程式 OK"
echo "請重新開機,完成所有設定"
pause
exit
:x64
echo "x64"
echo 安裝讀卡機驅動程式所在路徑為 %driver01_64%
start /wait %driver01_64% /S /v/qn
echo "安裝讀卡機驅動程式 OK"
echo "請重新開機,完成所有設定"
pause
exit
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto x64
rem 針對win10有32跟64位元的判斷
:x86
echo "x86"
echo 安裝讀卡機驅動程式所在路徑為 %driver01_86%
start /wait %driver01_86% /S /v/qn
echo "安裝讀卡機驅動程式 OK"
echo "請重新開機,完成所有設定"
pause
exit
:x64
echo "x64"
echo 安裝讀卡機驅動程式所在路徑為 %driver01_64%
start /wait %driver01_64% /S /v/qn
echo "安裝讀卡機驅動程式 OK"
echo "請重新開機,完成所有設定"
pause
exit
沒有留言:
張貼留言