강좌 / 팁

소프트웨어 오토핫키 스크립트 내에 바이너리 포함시키기

2021.01.07 22:42

지후빠 조회:1162 추천:7

안녕하세요? 점심시간에 짬을내어, (DISM_Onekey_BR 10 버전 가는데 도움이 될까해서 ^^; 청락님 참고해보시길...)

청락님 게시물에 포함된 DISM_PE 폴더내 cmd 파일을 DISM_Onekey.ahk 안에 포함시키는 방법을 찾아보았습니다.

- https://windowsforum.kr/gallery/15050230 

 

일반적인 배치파일이면 쉬운데 암호화되어 있어서 여러가지 시도해봤는데 안되더군요.

퇴근후 결국 검색으로 해결되네요. 오토핫키 스크립트 내에 바이너리를 임배딩시키는 방법으로 훌륭합니다.

 

게시물; Include virtually any file in a script (exe/zip/dll/etc....)

- https://autohotkey.com/board/topic/64481-include-virtually-any-file-in-a-script-exezipdlletc/page-1

- Include file.ahk 버전 2.6 첨부합니다. Include file.ahk


게시물 페이지 설명; 이건 pass 해도 괜찮을 듯 합니다.

I have always wanted a way to pack files into a script for portability but I have never been able to find one.

 

That came to this:

Store virtually any file in a .ahk script (or compiled .exe)

Download: Here Include file.ahk

Current version: 2.6

Compatible with: AHK Basic, AHK L ANSI, AHK L Unicode (X86/X64)

 

File types i've tested and know work: .zip, .exe, .txt, .ahk, ...anything?

The .ahk size of the file is rougly 1.33x the normal filesize(s). The compiled .exe (without compression) is rougly 1-1.05x the included filesize(s).

If you find any bugs or have anything to suggest please feel free to post.

 

How to use!:

1. Download and save the .ahk to a directory of your choosing.

2. Run the script

3. Select a file you want to include with your script(s)

4. Enter a name for the function you call to recreate the file (valid function names only)

5. Wait for it to do its stuff

6. Answer the questions on how you want to save the script

7. Simply include the code via #include or pasting it into your script

8. Call the function with Extract_*name* and the path/name of the file you want it to save as and it will recreate the file


- 실행시키면 파일 파일 선택 창이 나옵니다.

2021-01-07_222121.png

- 파일을 선택후 열기하면 AHK에 생성될 함수이름을 넣습니다.

2021-01-07_222228.png

- 순식간에 변환되었다하고 파일로 저장할 거냐고 묻습니다. 위의 함수 이름으로 파일을 생성합니다.

- include로 쓰거나 스크립트 내 복/붙해서 사용

2021-01-07_222340.png

- 클립보드로도 붙여 넣을거냐 묻습니다.

2021-01-07_222408.png

- 생성된 파일과 메모장에 붙여넣은 형태입니다.

2021-01-07_222535.png

- 사용은 다음처럼 하시면... ㅋ~

SetWorkingDir %A_ScriptDir% 

Onekey_Backup("Onekey_Backup.cmd")

Onekey_Restore("Onekey_Restore.cmd")

return

 

- 눈길 조심하시구요. 좋은 하루 되십시오.^^

번호 제목 글쓴이 조회 추천 등록일
[공지] 강좌 작성간 참고해주세요 gooddew - - -
820 소프트웨어| WinNTSetup.exe에 소소한 팁들 [18] suk 3468 25 03-09
819 소프트웨어| Firefox 86.0의 새로운 기능과 변경된 내용 [6] VₑₙᵤₛG 1702 4 02-24
818 소프트웨어| 두고 두고 쓰는 필수 크롬 확장앱 [5] 노래빠바바 6009 2 02-21
817 소프트웨어| 크로미움 브라우저에 검색엔진이 없을 때 Antory 1304 3 02-15
816 소프트웨어| 디지털 포렌식 툴 - FTK imager [15] 오스 5043 25 01-28
815 소프트웨어| 간단한 크롬(Chrome) 팁 12개 정리 [15] 컴알못러 6681 29 01-28
814 소프트웨어| [OP]GoodbyeDPI 0.1.6 Open Source Platform [1] Antory 1241 2 01-28
813 소프트웨어| 오토핫키 절대한영전환 사용하기 [8] 미유키로즈 2179 9 01-21
812 소프트웨어| 업그레이드, 랜섬웨어 에서 바라본 백업의 중요성 [3] elios 2299 5 01-15
811 소프트웨어| IFW 자체 정보 얻기 활용. 최종. Image For Windows [18] 입니다 1679 10 01-13
810 소프트웨어| 오토핫키로 시작 메뉴 위치 변경하기 [9] 미유키로즈 1113 5 01-13
809 소프트웨어| utorrent 간단 사용법 [3] 간장종지646 2516 12 01-11
» 소프트웨어| 오토핫키 스크립트 내에 바이너리 포함시키기 [9] 지후빠 1162 7 01-07
807 소프트웨어| 사무실 사용자 지정 설치 위해 ODT 관련 [1] RoyalS 1228 2 01-06
806 소프트웨어| nircmd.exe 다운 받아 windir에 복사하기 ps1 ahk [19] 지후빠 895 6 01-05
805 소프트웨어| Ventoy 대용량 usb/외장하드 부팅 문제 해결 [17] suk 4056 22 12-25
804 소프트웨어| Edge 업데이트 차단하기 [5] 봄빛깔 1993 5 11-26
803 소프트웨어| S3. 번역기-Firefox+Google Chrome용 부가 기능: 한국어 지원 [2] VₑₙᵤₛG 1122 6 11-24
802 소프트웨어| Ventoy 설치 중 에러 [4] 별내리는바 2323 4 11-16
801 소프트웨어| OCR(문자 인식) 활용 & 자작 프로그램 [12] 바이바이 2772 17 11-16
XE1.11.6 Layout1.4.8