Languages:
[EN] English |
[KO] 한국어
Overview 소개
Since Windows XP, I initially created a simple script for migration tasks and have continued to use and gradually upgrade it, but it has grown larger than expected.
The reason it was developed as a batch script is that it was originally intended only for transferring IP information and simple data. In environments with complex security, running external executables can be burdensome, so a batch script was chosen.
윈도우 XP 때부터 마이그레이션 작업을 위해 간단히 만들었던 스크립트를 계속 사용하면서 업그레이드를 조금씩 하였는데 생각보다 덩치가 커졌습니다.
배치 스크립트로 제작된 이유는 처음부터 IP정보 및 간단한 정보 이전을 목적으로 제작하였고 보안이 복잡한 곳은 외부 exe를 실행하기가 부담되기 때문에 배치 스크립트로 제작
- Initially created only for transferring computer IP information
- Expanded to transfer basic information, network settings, printer configuration, and account data
- Printer driver setup and installation is the most complex, requiring prior review of manufacturer-specific settings (mostly stored in the registry)
- PC_Backup.cmd and PC_Restore.cmd scripts need adjustment according to company requirements
- Automatic reboot and auto-run scripts simplify the installation process
- After installing a new PC, applying existing user data and environment settings means no further intervention is needed
- On-site use improves efficiency by at least 2–4 times compared to traditional methods
- For small to medium-scale PC replacement projects, labor costs can be reduced by 30–50%
- Technicians simply insert a USB -> back up data -> install the new PC -> run the script & perform AD -> immediately move on to the next PC
- 처음에는 단순히 컴퓨터 IP 정보 이전 기능만 제작
- 확장하여 기본 정보, 네트워크 정보, 프린터 설정 및 구성, 계정 정보까지 이전 가능
- 프린터 드라이버 구성 및 설치가 가장 복잡하며 제조사별 설정을 미리 확인 필요 (대부분 레지스트리 저장)
- 업체 요구에 맞춰 PC_Backup.cmd, PC_Restore.cmd 스크립트 조정 필요
- 자동 재부팅 및 자동 실행 스크립트로 설치 과정 단순화
- 새 PC 설치 후 기존 사용자 데이터와 환경설정 적용 → 작업자가 추가 신경 쓸 필요 없음
- 현장 적용 시 기존 방식 대비 최소 2~4배 효율 향상
- 소·중규모 PC 교체 프로젝트에서 인건비 30~50% 절감 가능
- 작업자는 USB 삽입 → 데이터 백업 → 새 PC 설치 → 스크립트 실행 & AD 수행 → 바로 다음 PC 작업 진행 가능
Framework Structure 프레임워크 구조
- Modular Structure
- Base functional modules separated: INI parser, UI, text processing, settings, DB
- Flexible execution types: standalone, sub-module execution, mandatory modules
- Central Library
- Lib.cmd allows reuse of common functions across all main scripts
- Automated Backup Process
- Collect host information (Workgroup/Domain, NIC, printer)
- Backup personal and data files
- Automated Restore Process
- Automatically restores backed-up environment info and data files
- Automatically sets PC name and joins Workgroup/Domain
- Automated Driver Creation and Installation
- Select printer manufacturer and generate meta driver files
- Parse INF files and automate driver installation
- Dynamic Code Composition
- Combine necessary scripts at runtime for execution
- Allows code reuse similar to C/C++ dynamic linker
- Flexible Function / Batch Calls
- Built-in functions for strings and CUI environment (e.g., trim)
- Modules can run independently or be called by parent/child modules
- Error Handling and Debugging Support
- Dump available if errors occur during execution
- Runtime tracing possible similar to a dynamic linker
- 모듈화 구조
- INI 파서, UI, 텍스트 처리, 설정, DB 등 기반 기능 모듈 분리
- 독립 실행, 하위 모듈 실행, 필수 모듈 등 실행 유형에 따라 유연하게 대응
- 중앙 라이브러리 제공
- Lib.cmd를 통해 모든 주요 스크립트에서 공통 기능 재사용 가능
- 백업 프로세스 자동화
- 호스트 정보 수집 (Workgroup/Domain, NIC, 프린터)
- 개인 파일, 데이터 파일 백업
- 복원 프로세스 자동화
- 백업된 환경 정보 및 데이터 파일 자동 복원
- PC 이름 설정, Workgroup/Domain 가입 자동 적용
- 드라이버 생성 및 설치 자동화
- 프린터 제조사 선택 및 메타 드라이버 생성
- INF 파일 파싱 및 드라이버 설치 자동화
- 동적 코드 합성 기능
- 실행 시 필요한 스크립트를 런타임에 합쳐 실행
- C/C++의 동적 링커와 유사한 방식으로 코드 재사용 가능
- 유연한 함수/배치 호출
- trim 등 문자열과 CUI 환경을 위한 함수 내장
- 모듈 단독 실행 가능, 상위/하위 모듈에서 호출 가능
- 에러 처리 및 디버깅 지원
- 실행 중 오류 발생 시 덤프 가능
- 동적 링커처럼 런타임 상태에서 문제 추적 가능
Code Snippet 일부 코드
Output Screen 실행 화면
Includes internal 32/64-bit detection feature
내부에 32/64 bit 감지 기능 포함
This is a manual installation menu that locates the corresponding printer driver from the backup data, installs it, automatically applies the previous settings, and prints a test page.
Each function can be used separately, as shown in the diagram, or invoked internally as needed.
수동 설치 메뉴이며 백업 데이터의 해당 프린터 드라이버를 찾아 설치하고 기존 정보대로 자동 설정 후 테스트 페이지 출력.
각 기능은 다이어그램처럼 별로도 사용가능도 하며 내부에서 불러와 사용도 됩니다.
Standalone script based on lib.cmd lib.cmd 기반 단독 스크립트
- Screen designed exclusively for a specific company
- After completing the setup, entering "install" performs personal account configuration, Windows settings, program installation, and reboot
- Since some programs require rebooting, multiple reboots may occur, all handled automatically
- Printer installation and test page printing are fully automated
- Operates without additional programs, ensuring no security issues and works properly in most environments
- 특정 업체 전용으로 제작된 화면
- 설정 완료 후 install 을 입력하면 개인 계정 설정, 윈도우 설정, 프로그램 설치 및 재부팅
- 프로그램 별로 재부팅 요구가 있기 때문에 여러차례 가능하며, 모두 자동
- 프린터 설치, 테스트 페이지 출력 까지 모두 자동
- 별도 프로그램 없이 작동하기에 보안 문제가 없으며 대부분 환경에서 정상 작동






Comments
Post a Comment