사이트 내 전체검색
PHP
ActiveX Cab 파일 작성 방법 - Visual 2005 기준 (html 코드, inf 코드까지 다 있음)
로빈아빠
https://cmd.kr/php/277 URL이 복사되었습니다.

본문

ActiveX Cab 파일 작성 방법 - Visual 2005 기준

http://codecrue.egloos.com/27755
http://jys92.com.ne.kr/VisualC/MakeCab.htm
위의 링크를 참고하여 작성하도록 하면 된다. 설명이 잘 되어있다.
------------------------------------------------------------------------------------------------------------

1 .inf 파일을 작성하도록 합니다.
2. .dll이나 ocx파일과 1번에서 작성했던 inf 파일을 묶어서 .cab파일을 만듭니다. (cab은 압축파일)
3. 만들어진 cab파일에 서명을 하도록 합니다.
4. 마지막으로 dll이나 ocx를 장착한 웹페이지에 작성된 cab파일에 대한 등록 내용을 추가로 작성하도록 합니다.

관련파일 : 서명 위한 파일 등   ActiveXSign.zip 첨부

=========== a.inf ===================================
[version]
; version signature (same for both NT and Win95) do not remove
signature="$CHICAGO$"
AdvancedINF=2.0

[Add.Code]
test.ocx=test.ocx

[ActiveXTest.ocx]
file-win32-x86=thiscab
clsid={CAD0DD54-68AA-4B62-8483-0208346772D3}
; Add your ocx's file version here.
FileVersion=1,0,0,1
RegisterServer=yes

=========== index.html ===================================
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<html>
<head>
<base target="detail">
<title>TaskForce</title>
<meta name="generator" content="Namo WebEditor v3.0">
</head>

<body bgcolor="white" text="black" link="blue" vlink="purple" alink="red">
<p><object classid="CLSID:CAD0DD54-68AA-4B62-8483-0208346772D3" codebase="ActiveXTest.CAB#version=1,0,0,1"
width="300" height="330" id="test">
</object>
</p>
</body>
</html>

CAB 파일 제작 후 Sign 하기 위해 명령어를 입력해야하는데 이건 꽤 복잡하므로 직접 명령어를 치는 것 보다
배치파을 만들어서 사용하는 것이 편하다


서명을 위한 배치파일을 작성하자 

  cabarc.exe -s 6144 n a.cab A.ocx A.inf 
  setreg.exe 1 TRUE
  makecert.exe -n "CN=COMPANY" -sv A.pvk A.cer
  cert2spc.exe mycert.cer A.spc
  SIGNCODE.exe -v A.pvk -spc A.spc A.cab
  setreg.exe -q 1 TRUE
  chktrust.exe A.cab



위의 명령어에서 NAME 을 내가 생성하려는 Project Name으로 변경하여 쓰면 된다.
배치 파일을 하나 만들면 다시 만들어 배포할때 클릭하나면 된다.
암호키를 입력하라고 하면 임의의 암호를 똑같이 입력 하면 된다.



출처 : http://marsgirlv.egloos.com/4758101

댓글목록

등록된 댓글이 없습니다.

PHP
871 (11/18P)

Search

Copyright © Cmd 명령어 3.142.195.16