標籤

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)

2020年8月26日 星期三

2020年8月16日 星期日

C++程式,九宮格問題 或是 三階魔方陣

在下列的九宮格中,填入1~9,使得每個行與列,以及兩個主對角線的數字和都一樣。

一、逐步對k=1~9,每一步都列出來。
二、整理k=1~9為if elseif elseif else 的程式碼。

一、逐步對k=1~9,每一步都列出來。
CPP 程式碼:
檔名:NXN01.cpp
檔案內容:
#include <iostream>
#include <math.h>
#define N 3
using namespace std;

int main() {
int A[N][N]={0};
int i,j,Nexti,Nextj,k;
for (j=0;j<N;j++) {
for (i=0;i<N;i++){
cout << A[i][j] <<' ';
}
cout <<endl;
}
cout <<endl;
k=1;
i=0;
j=floor(N/2);
A[i][j]=k;
k=2;
i=i-1;
j=j-1;
if (i<0) {
i=N-1;
}
A[i][j]=k;
k=3;
i=i-1;
j=j-1;
if (j<0) {
j=N-1;
}
A[i][j]=k;
k=4;
i=i-1;
j=j-1;
if (A[i][j]!=0) {
i=i+2;
j=j+1;
}
A[i][j]=k;
k=5;
i=i-1;
j=j-1;
A[i][j]=k;

k=6;
i=i-1;
j=j-1;
A[i][j]=k;

k=7;
i=i-1;
j=j-1;
if (i<0 && j<0) {
i=i+2;
j=j+1;
}
A[i][j]=k;

k=8;
i=i-1;
j=j-1;
if (j<0) {
j=N-1;
}
A[i][j]=k;

k=9;
i=i-1;
j=j-1;
if (i<0) {
i=N-1;
}
A[i][j]=k;
for (j=0;j<N;j++) {
for (i=0;i<N;i++){
cout << A[i][j] <<' ';
}
cout <<endl;
}
}
執行結果:

二、整理k=1~9為if elseif elseif else 的程式碼。
CPP 程式碼:
檔名:NXN02.cpp
檔案內容:
#include <iostream>
#include <math.h>
#define N 3
using namespace std;

int main() {
int A[N][N]={0};
int i,j,Nexti,Nextj,k;
for (j=0;j<N;j++) {
for (i=0;i<N;i++){
cout << A[i][j] <<' ';
}
cout <<endl;
}
cout <<endl;
k=1;
i=0;
j=floor(N/2);
A[i][j]=k;
for (k=2;k<=N*N;k++) {
i=i-1;
j=j-1;
    if (i<0 && j>=0) {
    i=N-1;
    } else if (j<0 && i>=0) {
    j=N-1;
    } else if (i<0 && j<0) {
i=i+2;
        j=j+1;
    } else if (A[i][j]!=0) {
    i=i+2;
    j=j+1;
    } 
A[i][j]=k;
}
for (j=0;j<N;j++) {
for (i=0;i<N;i++){
cout << A[i][j] <<' ';
}
cout <<endl;
}
}
 執行結果:


2020年8月13日 星期四

以Brother T910DW為例,如何修改一鍵完成印表機安裝驅動BAT,來配合所屬單位的印表機

前篇:

       今天針對上一篇利用 BAT 一鍵完成印表機安裝驅動,進行說明。

範例檔案,解壓密碼demo1234

步驟:

1.取得印表機驅動程式,以Brother T910DW為例,要找到INF檔。

2.將解壓縮後的資料夾gdi,放入AutoInstall資料夾內

3.取得BAT所需的資料

詳細說明:

1. 取得印表機驅動程式,以Brother T910DW為例,要找到INF檔




2.將解壓縮後的資料夾gdi,放入AutoInstall資料夾內

注意:放入AutoInstall資料夾內的路徑為gdi\,要寫入BAT

3.取得BAT所需的資料

批次檔內容:
@echo off
set Printer_ip=依照學校需求規劃
echo "要連接印表機用的ip為Printer_ip%"
set Printer_name2="依照學校需求規劃"
echo "印表機顯示的名稱為%Printer_name2%"
set Printer_86_driver="%~dp0AutoInstall\gdi\BRPRI17C.INF"
REM "x86的驅動程式%Printer_86_driver%"
set Printer_64_driver="%~dp0AutoInstall\gdi\BRPRI17C.INF"
REM "x64的驅動程式%Printer_64_driver%"
set Printer_name="Brother MFC-T910DW Printer"
echo "印表機型號%Printer_name%"
共有三項要填入:
(1)gdi\如何取得?
(2)BRPRI17C.INF如何取得?
(3)Brother MFC-T910DW Printer如何取得?

詳細說明如下:

(1)gdi\如何取得?即放入AutoInstall資料夾內的路徑為gdi\

(2)BRPRI17C.INF如何取得?




(3)Brother MFC-T910DW Printer如何取得?

資料來源:

1.利用 BAT 一鍵完成印表機安裝驅動


2020年8月12日 星期三

只要會對BAT用滑鼠點兩下,快速設定連結網頁

20200812

檔案下載


檔名:HtmlGenerator.bat

內容:

@echo off

REM ----------------以下為設定檔-可修改--------------------------

REM -以下為讀取檔案

set FileInName=config.txt

REM -以下為產出檔案

set FileOutName=index.html

REM -以下為網頁標題

set HtmlTitle=課程連結頁面

REM ----------------以下為程式碼-不可修改--------------------------- 

echo "<html>" > "%FileOutName%"

echo "<head>"  >> "%FileOutName%"

echo "<title>%HtmlTitle%</title>"  >> "%FileOutName%"

echo "<style type=text/css>"  >> "%FileOutName%"

echo "<!--"  >> "%FileOutName%"

echo ".style {font-size: 36px}"  >> "%FileOutName%"

echo "-->"  >> "%FileOutName%"

echo "</style>"  >> "%FileOutName%"

echo "<body>"  >> "%FileOutName%"

echo "<center>"  >> "%FileOutName%"

for /f "tokens=1,2 delims= " %%a in (%FileInName%) do (

   echo  "<br><span class='style'><a href='%%b' class='style2' target='_blank'>%%a</a></span><br>"  >> "%FileOutName%"

)

echo "</center>"  >> "%FileOutName%"

echo "</body>"  >> "%FileOutName%"

echo "</html>"  >> "%FileOutName%"


設定檔案
檔名:config.txt
內容:
伸港國中 http://www.skjh.chc.edu.tw/xoops256skjh/
教務部雲端電郵 https://mail.edu.tw/edumail.html
彰化GSuite https://gsuite.chc.edu.tw/
校務雲端系統 https://cloudschool.chc.edu.tw/
教師在職進修網 https://www4.inservice.edu.tw/
Scratch3.0線上版 https://scratch.mit.edu/projects/editor/?tutorial=getStarted
生科_三視圖 http://163.22.72.1/teach/draw/


資料來源:

2020年8月10日 星期一

只要會用滑鼠點兩下,快速產生一堆的印表機一鍵完成驅動安裝.BAT


        由於學校的印表機種類很多。希望能在設定檔(config.txt)內,完成設定後。再於Driver資料夾內,放入印表機驅動程式。只要對PrinterAutoInstallBatGenerator.exe,用滑鼠點兩下。就能快速產生一堆的"印表機一鍵完成驅動安裝.BAT"。而不用針對校內各種印表機,自己手動修改印表機一鍵完成驅動安裝.BAT。

使用方法:
1.下載檔案下載
2.解壓縮,解壓密碼demo1234
3.修改設定檔config.txt
4.對資料夾內的PrinterAutoInstallBatGenerator.exe 點兩下
5.會產生 xxXXXX印表機_修正.bat
6.修改xxXXXX印表機_修正.bat,完成。
   (修改方法:BAT內容修改-H改為-h,-O改為-o。印表機型號$用空格取代。)

config.txt 內容(不斷增加組數[一組10行,以顏色區隔],就會多出組數的BAT。):

#印表機中文名稱
專任室印表機
#印表機IP
172.20.3.94
#印表機驅動位置(32位元)
x86\KOAYTJ__.INF
#印表機驅動位置(64位元)
x64\KOAYTJ__.INF
#印表機型號(空格請用$取代)
KONICA$MINOLTA$C554$PCL$Mono
#印表機中文名稱
導師室印表機
#印表機IP
172.20.3.93
#印表機驅動位置(32位元)
x86\KOAYTJ__.INF
#印表機驅動位置(64位元)
x64\KOAYTJ__.INF
#印表機型號(空格請用$取代)
KONICA$MINOLTA$C554$PCL$Mono

由範例產生的結果圖片如下


程式碼:

#include <iostream>
#include <fstream>
#define MAX_FILENAME 100
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
using namespace std;

struct PrinterNameAndIp {
 char PrinterChiName[MAX_FILENAME];
 char PrinterIP[MAX_FILENAME];
 char Printerx32Driver[MAX_FILENAME];
 char Printerx64Driver[MAX_FILENAME];
 char PrinterEngModel[MAX_FILENAME];
}; 
int main() {
/*讀取設定檔的變數*/
 char PrinterChiNameMark[MAX_FILENAME]; 
 char PrinterIPMark[MAX_FILENAME];
 char Printerx32DriverMark[MAX_FILENAME];
 char Printerx64DriverMark[MAX_FILENAME];
 char PrinterEngModelMark[MAX_FILENAME];
 struct PrinterNameAndIp PNAI[MAX_FILENAME];
 int Total_Printers;
/*讀取設定檔config.txt,並將設定寫入變數*/
    ifstream fin("config.txt"); 
    if(!fin) { 
        cout << "無法讀入檔案\n"; 
        return 1; 
    }
    Total_Printers = 1;
  while(!fin.eof()) { 
    fin >> PrinterChiNameMark;
    fin >> PNAI[Total_Printers].PrinterChiName; 
    fin >> PrinterIPMark;
    fin >> PNAI[Total_Printers].PrinterIP;
    fin >> Printerx32DriverMark;
    fin >> PNAI[Total_Printers].Printerx32Driver;
    fin >> Printerx64DriverMark;
    fin >> PNAI[Total_Printers].Printerx64Driver;
    fin >> PrinterEngModelMark;
    fin >> PNAI[Total_Printers].PrinterEngModel;
     Total_Printers++;
    if (Total_Printers>=100) {
      cout <<"\n警告!!讀取名稱與對應IP資料數超過100!!\n需修改原始碼MAX_FILENAME並重新編譯!!\n";
     }
  }   
    fin.close();

    char chFileName[MAX_FILENAME];
    FILE * fp;
    int i;
    for(i=1;i<Total_Printers;i++) { 
     sprintf(chFileName, "%02d%s_修正.bat",i,PNAI[i].PrinterChiName);
     fp = fopen(chFileName, "w");
     fprintf(fp, "@echo off\n");
     fprintf(fp, "set Printer_ip=%s\n",PNAI[i].PrinterIP);
     fprintf(fp, "echo \"要連接印表機用的ip為%Printer_ip%\"\n");        
     fprintf(fp, "set Printer_name2=\"%s\"\n",PNAI[i].PrinterChiName);
     fprintf(fp, "echo \"印表機顯示的名稱為%Printer_name2%\"\n");
     fprintf(fp, "set Printer_86_driver=\"%~dp0Drivers\\%s\"\n",PNAI[i].Printerx32Driver);
     fprintf(fp, "REM \"x86的驅動程式%Printer_86_driver%\"\n"); 
     fprintf(fp, "set Printer_64_driver=\"%~dp0Drivers\\%s\"\n",PNAI[i].Printerx64Driver);
     fprintf(fp, "REM \"x64的驅動程式%Printer_64_driver%\"\n");
     fprintf(fp, "set Printer_name=\"%s\"\n",PNAI[i].PrinterEngModel);
     fprintf(fp, "echo \"印表機型號%Printer_name%\"\n\n");
     fprintf(fp, "if \"%PROCESSOR_ARCHITECTURE%\" == \"x86\" goto x86\n");
     fprintf(fp, "if \"%PROCESSOR_ARCHITECTURE%\" == \"AMD64\" goto x64\n");
     fprintf(fp, "rem 針對windows有32跟64位元的判斷\n\n");
     fprintf(fp, ":x86\n");
     fprintf(fp, "echo \"作業系統為x86\"\n");
     fprintf(fp, "echo \"驅動程式所在路徑為 %Printer_86_driver%\"\n");
     fprintf(fp, "rem driver放在同目錄下,路徑用.\\來作相對路徑\n");
     fprintf(fp, "C:\\Windows\\system32\\cscript.exe C:\\Windows\\system32\\Printing_Admin_Scripts\\zh-TW\\prnport.vbs -a -r IP_%Printer_ip% -H %Printer_ip% -O raw -n 9100\n");
     fprintf(fp, "rem 新增ip連接阜,已經存在也沒差\n");
     fprintf(fp, "rundll32 printui.dll,PrintUIEntry /if /r IP_%Printer_ip% /f %Printer_86_driver% /b %Printer_name2%_%Printer_name% /m %Printer_name%\n");
     fprintf(fp, "rem 新增印表機,如果已經有同樣名字的也會新增,名字後面會多(複本1)\n");
     fprintf(fp, "echo \"列表機安裝完成...請按任意鍵結束..\"\n");
     fprintf(fp, "pause\n\n");
     fprintf(fp, ":x64\n");
     fprintf(fp, "echo \"作業系統為x64\"\n");
     fprintf(fp, "echo \"驅動程式所在路徑為 %Printer_64_driver%\"\n");
     fprintf(fp, "rem driver放在同目錄下,路徑用.\\來作相對路徑\n");
     fprintf(fp, "C:\\Windows\\system32\\cscript.exe C:\\Windows\\system32\\Printing_Admin_Scripts\\zh-TW\\prnport.vbs -a -r IP_%Printer_ip% -H %Printer_ip% -O raw -n 9100\n");
     fprintf(fp, "rem 新增ip連接阜,已經存在也沒差\n");
fprintf(fp, "rundll32 printui.dll,PrintUIEntry /if /r IP_%Printer_ip% /f %Printer_64_driver% /b %Printer_name2%_%Printer_name% /m %Printer_name%\n");
     fprintf(fp, "rem 新增印表機,如果已經有同樣名字的也會新增,名字後面會多(複本1)\n");
fprintf(fp, "echo \"列表機安裝完成...請按任意鍵結束..\"\n");
     fprintf(fp, "pause\n");
     fclose(fp);   
    }
printf("\n請記得對BAT內容修改-H改為-h,-O改為-o。印表機型號$用空格取代\n"); 
system("PAUSE");
        return 0; 
}

資料來源:
1.利用 BAT 一鍵完成印表機安裝驅動 

在Windows 10 x64 1909版本的VirtualBox虛擬機安裝WampServer,並可在HOST裡瀏覽其首頁

 1.下載

下載網頁位置

或是上圖wampserver3.2.3_x64.exe下載位置

此外,在Windows 10 x64 1909版本中,還需要先安裝VC11VC13VC16

現在將上述所需軟體整合成一個壓縮檔

2.安裝

3.設定中文

4.設定


資料來源:

1.[PHP網站建立教學][1] – 安裝伺服器 WampServer

2.[轉] WampServer 用自已電腦架站

3.執行遊戲或程式出現缺少MSVCP120.dll該怎辦?

2020年8月2日 星期日

在 Windows 10 x64 1909版,使用BAT快速安裝彰化縣公文系統

上一篇  在Windows 7,用 BAT 一鍵安裝縣公文系統

修正事項:20200820修正HiCOS_Client版本 
20200810~20200812

程式下載,解壓密碼demo1234

使用影片教學


@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 ----------------以下為IE啟動網頁----------------
set homepage01=http://gdms.chcg.gov.tw/
set homepage02=https://edit.chcg.gov.tw/kw/\0
set homepage03=http://172.20.3.50/httpweb/admin/public/login.asp\0
REM ----------------以下為程式碼-不可修改---------------------------

if "%PROCESSOR_ARCHITECTURE%" == "x86" goto x86
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto x64
rem 針對win10有32跟64位元的判斷

:x86
echo "x86"
echo 安裝MOICA內政部憑證管理程式所在路徑為 %driver04%
"%driver04%" /quiet /norestart
echo "安裝MOICA內政部憑證管理程式 OK"
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%" /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 複製捷徑到桌面
@echo -------------------------------------------------------------------------------
copy "%~dp0AutoInstall\公文整合資訊系統.url" "%USERPROFILE%\desktop"
@echo 捷徑複製完成
echo 安裝讀卡機驅動程式所在路徑為 %driver01_86%
start /wait %driver01_86% /S /v/qn
echo "安裝讀卡機驅動程式 OK"
echo 安裝筆硯安裝程式所在路徑為 %driver02%
msiexec /package %driver02% /quiet /norestart
echo 安裝筆硯安裝程式所在路徑為 %driver03%
msiexec /package %driver03% /quiet /norestart
echo "安裝筆硯安裝程式 OK"
echo "請重新開機,完成所有設定"
pause
exit

:x64
echo "x64"
echo 安裝MOICA內政部憑證管理程式所在路徑為 %driver04%
"%driver04%" /quiet /norestart
echo "安裝MOICA內政部憑證管理程式 OK"
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%" /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 複製捷徑到桌面
@echo -------------------------------------------------------------------------------
copy "%~dp0AutoInstall\公文整合資訊系統.url" "%USERPROFILE%\desktop"
@echo 捷徑複製完成
echo 安裝讀卡機驅動程式所在路徑為 %driver01_64%
start /wait %driver01_64% /S /v/qn
echo "安裝讀卡機驅動程式 OK"
echo 安裝筆硯安裝程式所在路徑為 %driver02%
msiexec /package %driver02% /quiet /norestart
echo 安裝筆硯安裝程式所在路徑為 %driver03%
msiexec /package %driver03% /quiet /norestart
echo "安裝筆硯安裝程式 OK"
echo "請重新開機,完成所有設定"
pause
exit


20200803~20200809程式下載
利用虛擬機安裝 Windows 10 x64 1909 版本
下圖是 IE11 左邊是關於初始的 ActiveX 的設定  右邊是相對應的初始登錄檔Registry 的設定
下圖是 IE11 左邊是關於公文 ActiveX 的設定  右邊是相對應的公文登錄檔Registry 的設定

下圖是比較表
接下來,就把這些數值寫進bat
@echo off

if "%PROCESSOR_ARCHITECTURE%" == "x86" goto x86
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto x64
rem 針對win10有32跟64位元的判斷

:x86
echo "x86"
set driver04=%~dp0AutoInstall\HiCOS_Client.exe
echo 安裝MOICA內政部憑證管理程式所在路徑為 %driver04%
"%~dp0AutoInstall\HiCOS_Client.exe" /quiet /norestart
echo "安裝MOICA內政部憑證管理程式 OK"
set IEpath=HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
echo 設置首頁索引標籤
@reg add "%IEpath%" /v "Start Page" /t REG_SZ /d "http://gdms.chcg.gov.tw/" /f
@reg add "%IEpath%" /v "Secondary Start Pages" /t REG_MULTI_SZ /d "https://edit.chcg.gov.tw/kw/\0http://172.20.3.50/httpweb/admin/public/login.asp\0" /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 複製捷徑到桌面
@echo -------------------------------------------------------------------------------
copy "%~dp0AutoInstall\公文整合資訊系統.url" "%USERPROFILE%\desktop"
@echo 捷徑複製完成
set driver01=%~dp0AutoInstall\EZ100_Driver_32bit.exe
set driver02=%~dp0AutoInstall\docNinstall.msi
set driver03=%~dp0AutoInstall\docNcomp42@0_13a42.msi
echo 安裝讀卡機驅動程式所在路徑為 %driver01%
start /wait %driver01% /S /v/qn
echo "安裝讀卡機驅動程式 OK"
echo 安裝筆硯安裝程式所在路徑為 %driver02%
msiexec /package %driver02% /quiet /norestart
echo 安裝筆硯安裝程式所在路徑為 %driver03%
msiexec /package %driver03% /quiet /norestart
echo "安裝筆硯安裝程式 OK"
echo "請重新開機,完成所有設定"
pause
exit

:x64
echo "x64"
set driver04=%~dp0AutoInstall\HiCOS_Client.exe
echo 安裝MOICA內政部憑證管理程式所在路徑為 %driver04%
"%~dp0AutoInstall\HiCOS_Client.exe" /quiet /norestart
echo "安裝MOICA內政部憑證管理程式 OK"
REM 設置IE首頁索引標籤
set IEpath=HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
echo 設置首頁索引標籤
@reg add "%IEpath%" /v "Start Page" /t REG_SZ /d "http://gdms.chcg.gov.tw/" /f
@reg add "%IEpath%" /v "Secondary Start Pages" /t REG_MULTI_SZ /d "https://edit.chcg.gov.tw/kw/\0http://172.20.3.50/httpweb/admin/public/login.asp\0" /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 複製捷徑到桌面
@echo -------------------------------------------------------------------------------
copy "%~dp0AutoInstall\公文整合資訊系統.url" "%USERPROFILE%\desktop"
@echo 捷徑複製完成
set driver01=%~dp0AutoInstall\EZ100_Driver_64bit.exe
set driver02=%~dp0AutoInstall\docNinstall.msi
set driver03=%~dp0AutoInstall\docNcomp42@0_13a42.msi
echo 安裝讀卡機驅動程式所在路徑為 %driver01%
start /wait %driver01% /S /v/qn
echo "安裝讀卡機驅動程式 OK"
echo 安裝筆硯安裝程式所在路徑為 %driver02%
msiexec /package %driver02% /quiet /norestart
echo 安裝筆硯安裝程式所在路徑為 %driver03%
msiexec /package %driver03% /quiet /norestart
echo "安裝筆硯安裝程式 OK"
echo "請重新開機,完成所有設定"
pause
exit






20200731
感恩廠商的bat檔。藉著觀摩廠商的bat檔,修改自己的bat檔。但是還是有些不完美!!
配合不上 Windows 10 x64,還是要回到原點。

公文系統自動安裝20200731.rar

@echo off

if "%PROCESSOR_ARCHITECTURE%" == "x86" goto x86
if "%PROCESSOR_ARCHITECTURE%" == "AMD64" goto x64
rem 針對win7有32跟64位元的判斷

:x86
echo "x86"
set driver04=%~dp0AutoInstall\HiCOS_Client.exe
echo 安裝MOICA內政部憑證管理程式所在路徑為 %driver04%
"%~dp0AutoInstall\HiCOS_Client.exe" /quiet /norestart
echo "安裝MOICA內政部憑證管理程式 OK"
set IEpath=HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
echo 設置首頁索引標籤
@reg add "%IEpath%" /v "Start Page" /t REG_SZ /d "http://gdms.chcg.gov.tw/" /f
@reg add "%IEpath%" /v "Secondary Start Pages" /t REG_MULTI_SZ /d "https://edit.chcg.gov.tw/kw/\0http://172.20.3.50/httpweb/admin/public/login.asp\0" /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 "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 "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1405" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2000" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2201" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2702" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "270C" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2200" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1406" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1609" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "160A" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "270C" /d "0" /t REG_DWORD /f
Reg.exe add "HKCU\Software\Microsoft\Internet Explorer\New Windows" /v "PopupMgr" /t REG_DWORD /d "0" /f
Reg.exe 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 複製捷徑到桌面
@echo -------------------------------------------------------------------------------
copy "%~dp0AutoInstall\公文整合資訊系統.url" "%USERPROFILE%\desktop"
@echo 捷徑複製完成
set driver01=%~dp0AutoInstall\EZ100_Driver_32bit.exe
set driver02=%~dp0AutoInstall\docNinstall.msi
set driver03=%~dp0AutoInstall\docNcomp42@0_13a42.msi
echo 安裝讀卡機驅動程式所在路徑為 %driver01%
start /wait %driver01% /S /v/qn
echo "安裝讀卡機驅動程式 OK"
echo 安裝筆硯安裝程式所在路徑為 %driver02%
msiexec /package %driver02% /quiet /norestart
echo 安裝筆硯安裝程式所在路徑為 %driver03%
msiexec /package %driver03% /quiet /norestart
echo "安裝筆硯安裝程式 OK"
echo "請重新開機,完成所有設定"
pause
exit

:x64
echo "x64"
set driver04=%~dp0AutoInstall\HiCOS_Client.exe
echo 安裝MOICA內政部憑證管理程式所在路徑為 %driver04%
"%~dp0AutoInstall\HiCOS_Client.exe" /quiet /norestart
echo "安裝MOICA內政部憑證管理程式 OK"
REM 設置IE首頁索引標籤
set IEpath=HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main
echo 設置首頁索引標籤
@reg add "%IEpath%" /v "Start Page" /t REG_SZ /d "http://gdms.chcg.gov.tw/" /f
@reg add "%IEpath%" /v "Secondary Start Pages" /t REG_MULTI_SZ /d "https://edit.chcg.gov.tw/kw/\0http://172.20.3.50/httpweb/admin/public/login.asp\0" /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 "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 "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1405" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "2000" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2201" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2702" /d "3" /t REG_DWORD /f
@reg add "%regpath%" /v "270C" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "2200" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1406" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "1609" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "160A" /d "0" /t REG_DWORD /f
@reg add "%regpath%" /v "270C" /d "0" /t REG_DWORD /f
Reg.exe add "HKCU\Software\Microsoft\Internet Explorer\New Windows" /v "PopupMgr" /t REG_DWORD /d "0" /f
Reg.exe 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 複製捷徑到桌面
@echo -------------------------------------------------------------------------------
copy "%~dp0AutoInstall\公文整合資訊系統.url" "%USERPROFILE%\desktop"
@echo 捷徑複製完成
set driver01=%~dp0AutoInstall\EZ100_Driver_64bit.exe
set driver02=%~dp0AutoInstall\docNinstall.msi
set driver03=%~dp0AutoInstall\docNcomp42@0_13a42.msi
echo 安裝讀卡機驅動程式所在路徑為 %driver01%
start /wait %driver01% /S /v/qn
echo "安裝讀卡機驅動程式 OK"
echo 安裝筆硯安裝程式所在路徑為 %driver02%
msiexec /package %driver02% /quiet /norestart
echo 安裝筆硯安裝程式所在路徑為 %driver03%
msiexec /package %driver03% /quiet /norestart
echo "安裝筆硯安裝程式 OK"
echo "請重新開機,完成所有設定"
pause
exit
資料來源:
1.bat指令碼批量靜默安裝程式
2.BAT批處理全自動(靜默)安裝軟體的方法(包含4種常見安裝包格式)
3.用bat自動執行安裝軟體,不用手動按下一步
4.自動安裝軟體 批次檔問題 ! !
5.#MIS事件簿-bat檔自動安裝
6.常用軟體快速安裝批次檔
7.軟體自動安裝參數說明-2
8.應用程序的全自動安裝——GUIRunOnce參數詳解
9.(免費)AutoIt(自動化.MIS.安裝軟體)
10.cmd - 如何在bat文件中調用另一個bat文件
11.用批次檔 解除/移除軟體安裝
12.使用vbs或者bat指令碼修改IE瀏覽器安全級別和選項
13.EasyFlow .NET 系統IE 瀏覽器詳細設定值
14.進階使用者的 Internet Explorer 安全性區域登錄項目
15.重要:EasyFlow首次使用需知 --> IE 瀏覽器詳細設定值
16.政府組態基準GCB_Windows設定對照表_V1.3
17.Bat 設定IE首頁及設定信任網站
18.How to set multiple homepage for ie and chrome with batch file?
19.允許主動式內容透過受限制的通訊協定來存取我的電腦
20.即使簽章無效也允許執行或安裝軟體
21.如何在Windows 10中關閉和禁用UAC
22.新增、修改、刪除登錄值的批次語法

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

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