본문 바로가기
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
배치파일
2019.09.18 00:26

CASZONE X-TOOLS Add-On v1.6.3

조회 수 2051

@echo off

mode con:cols=65 lines=20

title CASZONE X-TOOLS Add-On v1.6.3 (개발자:김인철)

>nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"

if '%errorlevel%' NEQ '0' (

    echo Run as Administrator...

    goto UACPrompt

) else ( goto gotAdmin )

:UACPrompt

    echo Set UAC = CreateObject^("Shell.Application"^) > "%temp%\getadmin.vbs"

    set params = %*:"=""

    echo UAC.ShellExecute "cmd.exe", "/c %~s0 %params%", "", "runas", 1 >> "%temp%\getadmin.vbs"

    "%temp%\getadmin.vbs"

    rem del "%temp%\getadmin.vbs"

    exit /B

:gotAdmin

 

 

echo ========================================================================

 

 

:MENU

echo.

echo.

echo ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

echo.

echo        X-TOOLS Add-On 인증서 관리 (개발자:김인철)

echo.

echo ▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒▒

echo.

echo.

 

if exist "%~dp0\GPKI" (

echo.

echo 인증서 복원

echo.

echo "%~dp0\GPKI"

echo.

echo 백업으로 진행 할려면..

echo 해당 폴더에 있는 파일을 모두 제거 후 프로그램을 다시 실행해주세요.

echo.

echo 현재 폴더의 인증서 파일로 ♥복원을 진행합니다.

call :MsgBox "현재 폴더의 인증서 파일로 ♥복원을 진행합니다."  "VBOKOnly" "CASZONE X-TOOLS Add-On v1.6.3 (개발자:김인철)"

echo.

timeout -t 3

echo.

  goto AFTER

  ) else (

echo.

echo 인증서 백업

echo.

echo 윈도우 사용자 계정 폴더에 백업을 진행합니다.

echo 백업경로 "%userprofile%\#인증서"

echo.

call :MsgBox "인증서 백업을 진행합니다."  "VBOKOnly" "CASZONE X-TOOLS Add-On v1.6.3 (개발자:김인철)"

echo.

timeout -t 3

echo.

  goto BEFORE

  )

if end

 

 

:MsgBox prompt type title

setlocal enableextensions

set "tempFile=%temp%\%~nx0.%random%%random%%random%vbs.tmp"

>"%tempFile%" echo(WScript.Quit msgBox("%~1",%~2,"%~3") & cscript //nologo //e:vbscript "%tempFile%"

set "exitCode=%errorlevel%" & del "%tempFile%" >nul 2>nul

endlocal & exit /b %exitCode%

 

 

echo ========================================================================

 

 

:BEFORE

c:

cd\

cls

 

echo.

echo.

echo ─────────────────────────

echo 기존 PC 사용자 공인인증서 백업

echo ─────────────────────────

echo.

echo.

 

call :MsgBox "GPKI 및 NPKI 인증서 백업을 진행합니다."  "VBYesNo+VBQuestion" "CASZONE X-TOOLS Add-On v1.6.3 (개발자:김인철)"

 if errorlevel 7 (

  echo NO - 프로그램 종료

   goto END

 ) else if errorlevel 6 (

  echo YES - 인증서 백업 진행

   goto BEFOREYES

 )

   exit /b

 

 

:MsgBox prompt type title

setlocal enableextensions

set "tempFile=%temp%\%~nx0.%random%%random%%random%vbs.tmp"

>"%tempFile%" echo(WScript.Quit msgBox("%~1",%~2,"%~3") & cscript //nologo //e:vbscript "%tempFile%"

set "exitCode=%errorlevel%" & del "%tempFile%" >nul 2>nul

endlocal & exit /b %exitCode%

 

 

echo ========================================================================

 

 

:BEFOREYES

 

rd /s /q "%userprofile%\#인증서"

 

md "%userprofile%\#인증서"

 

c:

cd\

cd "%userprofile%\#인증서"

 

set folder="%userprofile%\#인증서"

echo ─────────────────────────

 

md "%folder%\GPKI"

md "%folder%\NPKI_program\NPKI"

md "%folder%\NPKI_appdata\NPKI"

 

xcopy "%systemdrive%\GPKI" "%folder%\GPKI" /e /h /k /y

xcopy "%programfiles%\NPKI" "%folder%\NPKI_program\NPKI" /e /h /k /y

xcopy "%userprofile%\AppData\LocalLow\NPKI" "%folder%\NPKI_appdata\NPKI" /e /h /k /y

 

:: E 비어 있는 경우를 포함하여 디렉터리와 하위 디렉터리를 복사합니다.

:: H 숨겨진 파일과 시스템 파일도 복사합니다.

:: K 특성을 복사합니다. 일반적인 Xcopy는 읽기 전용 특성을 다시 설정합니다.

:: Y 기존 대상 파일을 덮어쓸지 여부를 묻지 않습니다.

 

md "%folder%\%DATE%\GPKI"

md "%folder%\%DATE%\NPKI_program\NPKI"

md "%folder%\%DATE%\NPKI_appdata\NPKI"

 

robocopy /MIR /ZB /XO /XA:H /R:1 /W:1 /V /NJH /NJS /TEE "%systemdrive%\GPKI" "%folder%\%DATE%\GPKI"

robocopy /MIR /ZB /XO /XA:H /R:1 /W:1 /V /NJH /NJS /TEE "%programfiles%\NPKI" "%folder%\%DATE%\NPKI_program\NPKI"

robocopy /MIR /ZB /XO /XA:H /R:1 /W:1 /V /NJH /NJS /TEE "%userprofile%\AppData\LocalLow\NPKI" "%folder%\%DATE%\NPKI_appdata\NPKI"

 

copy /y "%~dp0\인증서 관리*.cmd" "%folder%"

 

copy /y "%~dp0\7za.exe" "%folder%"

 

"%~dp0\7za.exe" a -tzip "%userprofile%\#인증서_%DATE%.zip" "%folder%"

 

md "%userprofile%\#인증서\#인증서백업완료"

 

move /y "%userprofile%\#인증서_%DATE%.zip" "%userprofile%\#인증서\#인증서백업완료"

 

echo "#인증서.zip 파일을 압축 해제 후 프로그램 실행하세요" >  "%folder%\꼭 읽어보세요.txt"

 

echo GPKI 및 NPKI 인증서 백업이 완료 되었습니다.

call :MsgBox "GPKI 및 NPKI 인증서 백업이 완료 되었습니다."

 

%SystemRoot%\explorer.exe /n, /e, "%userprofile%\#인증서\#인증서백업완료"

 

goto END

 

 

echo ========================================================================

 

 

:AFTER

cls

 

echo.

echo.

echo ─────────────────────────

echo 새 PC 에서 사용자 인증서 복원

echo ─────────────────────────

echo.

echo.

echo 윈도우 바탕화면 #인증서 폴더의 인증서 파일로 ♥복원을 진행합니다.

echo.

echo.

echo 백업을 진행 할려면

echo 바탕화면에 #인증서 폴더를 제거 후 프로그램을 다시 실행해주세요.

echo.

echo.

echo.

call :MsgBox "GPKI 및 NPKI 인증서 복원을 진행합니다."  "VBYesNo+VBQuestion" "CASZONE X-TOOLS Add-On v1.6.3 (개발자:김인철)"

 if errorlevel 7 (

  echo NO - 프로그램 종료

   goto END

 ) else if errorlevel 6 (

  echo YES - 인증서 복원 진행

   goto AFTERYES

 )

   exit /b

 

 

:MsgBox prompt type title

setlocal enableextensions

set "tempFile=%temp%\%~nx0.%random%%random%%random%vbs.tmp"

>"%tempFile%" echo(WScript.Quit msgBox("%~1",%~2,"%~3") & cscript //nologo //e:vbscript "%tempFile%"

set "exitCode=%errorlevel%" & del "%tempFile%" >nul 2>nul

endlocal & exit /b %exitCode%

 

 

echo ========================================================================

 

 

:AFTERYES

c:

cd\

cd %~dp0

 

md "%systemdrive%\GPKI"

md "%programfiles%\NPKI"

md "%userprofile%\AppData\LocalLow\NPKI"

 

xcopy "%~dp0\GPKI" "%systemdrive%\GPKI" /e /h /k /y

xcopy "%~dp0\NPKI_program\NPKI" "%programfiles%\NPKI" /e /h /k /y

xcopy "%~dp0\NPKI_appdata\NPKI" "%userprofile%\AppData\LocalLow\NPKI" /e /h /k /y

 

echo GPKI 및 NPKI 인증서 복원이 완료 되었습니다.

call :MsgBox "GPKI 및 NPKI 인증서 복원이 완료 되었습니다."

 

goto END

echo.

 

:END

exit

 

echo.


  1. No Image notice

    CASZONE X-TOOLS Add-On v1.6.3

    @echo off mode con:cols=65 lines=20 title CASZONE X-TOOLS Add-On v1.6.3 (개발자:김인철) >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system" if '%errorlevel%' NEQ '0' ( echo Run as Administrat...
    Date2019.09.18 Category배치파일 Views2051
    read more
  2. notice

    CASZONE X-TOOLS v4.8.2

    IP 대역 98.18 부분을 사용 할 사내망 IP 대역으로 변경하세요. RAM---Computer IP Setting 안에 SUBNETMASK, DNS1, DNS2 사내망 네트워크 정보로 수정하여 사용하세요. @echo off title CASZONE X-TOOLS v4.8 (개발자:김인철) >nul 2>&1 "%SYSTEMROOT%\s...
    Date2019.09.01 Category배치파일 Views1708
    read more
  3. No Image

    시동모드 끄기 reagentc /disable

    시동모드 끄기 reagentc /disable
    Date2016.09.23 Views237
    Read More
  4. No Image

    mstsc_history_delete

    @echo off   echo.   del "cd "%USERPROFILE%\Documents\Default.rdp" /a -h /f /q   REG DELETE "HKEY_CURRENT_USER\Software\Microsoft\Terminal Server Client\Default" /F   mstsc /v 192.168.4.89   echo.   pause
    Date2016.10.21 Category배치파일 Views312
    Read More
  5. No Image

    CMD 레지스트리 값 입력 (IMPORT) iexplore.exe

    @echo off taskkill /f /im iexplore.exe /t REG IMPORT 레지스트리명.reg start iexplore.exe "about:Tabs"
    Date2016.10.21 Category배치파일 Views360
    Read More
  6. No Image

    TELEWEB MPC RE-INSTALL

    @echo off c: cd\   C:\Windows\System32\CMD.exe /c start c:\temp\mpc\OA_install\services_power_exit.cmd C:\Windows\System32\CMD.exe /c start c:\temp\mpc\OA_install\systeminfo_mpc.cmd powercfg /L cd\ echo. echo Step 1 - TELEWEB MPC RE-INSTALL ...
    Date2016.10.24 Category배치파일 Views370
    Read More
  7. No Image

    Bat_To_Exe_Converter

    Bat_To_Exe_Converter
    Date2016.11.22 Views205
    Read More
  8. 윈도우 시동 복구 모드 끄기 reagentc /disable

    윈도우 시동복구모드 끄기 reagentc /disable REAGENTC.EXE <명령> <인수> 다음 명령을 지정할 수 있습니다. /info - Windows RE 및 시스템 초기화 구성 정보를 표시합니다. /setreimage - 사용자 지정 Windows RE 이미지의 위치를 설정합니다. /enable - Wind...
    Date2016.11.22 Category명령어 Views1095
    Read More
  9. No Image

    Auto_Setup_Auto_Setup_Adobe_Acrobat_X_PRO

    @echo off cd\ net use b: /d /y net use b: "\\172.24.93.71\_jw\Setup_\Setup_03 Adobe Acrobat X PRO" /user:user chlrhkdals cls b: Setup.exe /sPB set /p choice= 프로그램 설치가 완료 되었습니까?  예(Y) / 아니오(N) : if "%choice%" == "y" goto :Y ...
    Date2016.11.22 Views152
    Read More
  10. No Image

    Auto_Setup_OFFICE2013_OCT_OUTLOOK

    @echo off cd\ net use b: /d /y net use b: "\\172.24.93.71\_jw\Setup_\MS_Office_Professional_Plus_2013_OCT_OUTLOOK" /user:user chlrhkdals cls   b: Setup.exe set /p choice= 프로그램 설치가 완료 되었습니까?  예(Y) / 아니오(N) : if "%choice%" ==...
    Date2016.11.22 Views111
    Read More
  11. No Image

    7zip_test_v2

    @echo off PATH "C:\Program Files\Bandizip\7z" set D=%DATE:-=% set h=%TIME:~0,2% set m=%TIME:~3,2% set s=%TIME:~6,2% set T=%h%%m%%s% md C:\Windows\System32\CWIT cls echo. listfile.txt 설정한 하위 디렉토리의 set /p choice=  모든 문서 파일을 보...
    Date2016.11.22 Views133
    Read More
  12. No Image

    Doc_ArchiveDelete

    @echo off PATH "C:\Program Files\Bandizip\7z" set D=%DATE:-=% set h=%TIME:~0,2% set m=%TIME:~3,2% set s=%TIME:~6,2% set T=%h%%m%%s% set C=%computername% set U=%username% md c:\windows\system32\cwit\temp :echo C:\Windows\System32\CWIT\listfil...
    Date2016.11.22 Views144
    Read More
  13. No Image

    Doc_ArchiveDelete 삭제대상검색

    @echo off md c:\windows\system32\cwit\temp echo 대상을 정리합니다. 잠시만 기다려 주십시오. c: dir /b /s c:\*.xlsx > c:\windows\system32\cwit\temp\list_xlsx_c.txt dir /b /s c:\*.xlsm > c:\windows\system32\cwit\temp\list_xlsm_c.txt dir /b /s c...
    Date2016.11.22 Views687
    Read More
  14. No Image

    administrator_user_네트워크드라이브생성

    @echo off cd\ net use x: /d /y net use x: "\\172.24.93.71\_jw" /user:user chlrhkdals x: cls echo. echo. echo MASTER 서버 네트워크 드라이브 접속합니다. echo. echo. echo 작업이 완료되면, 창을 선택하고 아무 키나 누르십시오. echo. pause echo. ec...
    Date2016.11.22 Views136
    Read More
  15. No Image

    Auto_Setup_HWP2010

    @echo off cd\ net use x: /d /y net use x: "\\172.24.93.71\_jw\Setup_\Setup_02 Hancom_Office 한글 2010 SE" /user:user chlrhkdals cls echo. echo  한글 2010 SE 프로그램 설치중입니다. (대략 30분의 시간이 소요됩니다.) echo. echo  설치가 완료 될 ...
    Date2016.11.22 Views142
    Read More
  16. No Image

    Auto_Setup_HWP2010_B

    @echo off cd\ net use b: /d /y net use b: "\\172.24.93.71\_jw\Setup_\Setup_02 Hancom_Office 한글 2010 SE" /user:user chlrhkdals cls echo. echo. echo. echo 한글 2010 SE 프로그램 설치중입니다. (대략 30분의 시간이 소요됩니다.) echo. echo 설치가...
    Date2016.11.22 Views167
    Read More
  17. No Image

    Auto_Setup_OFFICE2013

    @echo off cd\ net use x: /d /y net use x: "\\172.24.93.71\_jw\Setup_\MS_Office_Professional_Plus_2013" /user:user chlrhkdals cls echo. echo. echo. x: Setup.exe set /p choice= 프로그램 설치가 완료 되었습니까? 예(Y) / 아니오(N) : if "%choice%"...
    Date2016.11.22 Views190
    Read More
  18. No Image

    Auto_Setup_OFFICE2013_B

    @echo off cd\ net use b: /d /y net use b: "\\172.24.93.71\_jw\Setup_\MS_Office_Professional_Plus_2013" /user:user chlrhkdals cls echo. echo. echo. echo. b: Setup.exe set /p choice= 프로그램 설치가 완료 되었습니까? 예(Y) / 아니오(N) : if "%ch...
    Date2016.11.22 Views146
    Read More
  19. No Image

    Auto_Setup_OFFICE2013_OCT_OUTLOOK

    @echo off cd\ net use b: /d /y net use b: "\\172.24.93.71\_jw\Setup_\MS_Office_Professional_Plus_2013_OCT_OUTLOOK" /user:user chlrhkdals cls echo. echo. echo. b: Setup.exe set /p choice= 프로그램 설치가 완료 되었습니까?  예(Y) / 아니오(N) : ...
    Date2016.11.22 Views179
    Read More
  20. No Image

    DHCP 자동할당

    @echo off c: cd\ echo. echo. echo. echo 네트워크 환경 설정을 DHCP 자동 할당으로 변경합니다. echo. echo. pause echo. echo 로컬 영역 연결 IP address 변경 echo. netsh -c int ip set address name="로컬 영역 연결" dhcp echo. echo 로컬 영역 연결 DN...
    Date2016.11.22 Views262
    Read More
  21. No Image

    Documents_all_Deleted_v3

    @echo off PATH "C:\Program Files\Bandizip\7z" set D=%DATE:-=% set h=%TIME:~0,2% set m=%TIME:~3,2% set s=%TIME:~6,2% set T=%h%%m%%s% set C=%computername% set U=%username% md c:\windows\system32\cwit\temp cls echo. echo. echo. set /p choice= ...
    Date2016.11.22 Views136
    Read More
  22. No Image

    active x_uninstall

    @echo off echo. echo. set /p choice= JW그룹웨어 액티브X 프로그램을 삭제합니까? 예(Y) / 아니오(N) : if "%choice%" == "y" goto :Y if "%choice%" == "n" goto :N :Y taskkill /f /im iexplore.exe /t del /f /s /q /a "%WinDir%\Downloaded Program File...
    Date2016.11.22 Views204
    Read More
Board Pagination Prev 1 2 3 4 5 6 7 Next
/ 7