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 homepage01=http://gdms.chcg.gov.tw/
set homepage02=http://oems.chcg.gov.tw/\0
set homepage04=http://172.20.3.50/httpweb/admin/public/login.asp\0
REM ----------------以下為程式碼-不可修改---------------------------
echo "確認MOICA內政部憑證管理程式安裝狀況"
@echo 安裝MOICA內政部憑證管理程式所在路徑為 %driver04%
"%driver04%" /quiet /norestart
@echo "安裝MOICA內政部憑證管理程式 OK"
) else (
@echo "已安裝MOICA內政部憑證管理程式"
)
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 "設定安全區域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"
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