코드
2018.07.16 07:21

폰트를 자동 설치하는 코드

조회 수 2341 추천 수 0 댓글 1
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
Extra Form
라이선스 GPL v2

VBS 스크립트입니다.


Call InstallFont("C:\폰트.ttf")
Sub InstallFont(FontPath) 
    Dim WshShell 
    Set WshShell = WScript.CreateObject("WScript.Shell") 

    Const FONTS = &H14& 
    Set objShell = CreateObject("Shell.Application") 
    Set objFolder = objShell.Namespace(FONTS) 

    objFolder.CopyHere FontPath
End Sub






PPT에 폰트를 포함했는데, 읽기전용으로 사용은 힘들고, 폰트 설치하는 화면을 보여주기에는 상황이 여의치 않을때 사용하기에 좋습니다.

저런 상황에서는 이렇게 사용하시면 됩니다.


Call InstallFont("파워포인트\폰트.ttf")

Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run("explorer 파워포인트\파워포인트.pptx")

WScript.Quit 

Sub InstallFont(FontPath) 
    Dim WshShell 
    Set WshShell = WScript.CreateObject("WScript.Shell") 

    Const FONTS = &H14& 
    Set objShell = CreateObject("Shell.Application") 
    Set objFolder = objShell.Namespace(FONTS) 

    objFolder.CopyHere WshShell.CurrentDirectory & "\" & FontPath
End Sub


이렇게 실행.vbs 같은 이름으로 저장하고, 파워포인트라는 폴더를 생성해 그 안에 폰트파일과 PPT 파일을 저장하면 됩니다.

물론 생성한 폴더와 VBS 파일은 같은 경로에 있어야 하구요.







  1. 최근 AI봇 때문에 트래픽 증가시 필요한 조치

    Date2026.04.13 Category코드 By마스터 Views30
    Read More
  2. AWSCLI, in a single file (portable, linux)

    Date2021.04.10 Category코드 BySeia Views2210
    Read More
  3. [Python-Gnuboard] 파이썬으로 구현한 그누보드 자동 글쓰기 함수

    Date2021.04.08 Category코드 By이니스프리 Views3673
    Read More
  4. [Python] 휴일지킴이 약국을 크롤링하여 Folium 지도에 마커로 표시하는 PyQt 윈도우 앱

    Date2021.03.13 Category코드 By이니스프리 Views3269
    Read More
  5. 도박 중독자를 위한 광고 차단 규칙

    Date2020.08.21 Category코드 By제르엘 Views2638
    Read More
  6. [Python] 유튜브 영상을 다운받아 일정 간격으로 캡쳐하여 10장씩 merge하기

    Date2020.05.27 Category코드 By이니스프리 Views3359
    Read More
  7. [Autohotkey] 매분 정각에 전체화면을 캡쳐하는 스크립트

    Date2020.05.22 Category자료 By이니스프리 Views3307
    Read More
  8. [Python/Telegram] Studyforus 알림봇 (댓글, 스티커 파싱)

    Date2020.05.15 Category코드 By이니스프리 Views2887
    Read More
  9. [Python] url 주소로부터 IP 주소 알아내기

    Date2020.02.20 Category코드 Bytitle: 황금 서버 (30일)humit Views4409
    Read More
  10. [Python] 네이버 실시간 검색어

    Date2020.01.23 Category코드 Bytitle: 황금 서버 (30일)humit Views3314
    Read More
  11. Koa에서 자동으로 라우팅 채워주기

    Date2020.01.22 Category코드 BySeia Views2767
    Read More
  12. JavaScript에서 파이썬 문자열 처리 함수 중 하나 (바인딩)를 구현

    Date2020.01.20 Category코드 BySeia Views2483
    Read More
  13. [Python] Google Image Search 결과를 받아오기

    Date2019.12.09 Category코드 By이니스프리 Views3364
    Read More
  14. [파이썬] Requests를 사용한 네이버 카페 크롤링 - 일정수 이상의 리플이 달린 게시글만 텔레그램 알림

    Date2019.11.17 Category코드 By이니스프리 Views6485
    Read More
  15. [JS] 클라이언트단 GET Parameter

    Date2019.11.16 Category코드 ByHanam09 Views2733
    Read More
  16. [Python] 싸이월드 미니홈피 백업 스크립트

    Date2019.11.07 Category코드 By이니스프리 Views4477
    Read More
  17. [Python] PIL을 이용한 Animated GIF의 리사이징

    Date2019.11.03 Category코드 By이니스프리 Views3632
    Read More
  18. [PyQt] sir.kr에서 스크랩한 게시글을 보여주는 윈도우앱 (검색 및 정렬 가능)

    Date2019.08.09 Category코드 By이니스프리 Views3235
    Read More
  19. [아미나] Dropbox API를 이용한 이미지 호스팅 보드스킨

    Date2019.07.13 Category코드 By이니스프리 Views3716
    Read More
  20. [Python] 네이버 모바일 이미지 검색에서의 이미지 파일을 멀티스레드로 다운받고 1개의 파일로 병합

    Date2019.07.12 Category코드 By이니스프리 Views3557
    Read More
Board Pagination Prev 1 2 3 4 Next
/ 4