Microsoft MVP성태의 닷넷 이야기
.NET : 122. msiexec.exe를 닷넷으로 만들어 보면! [링크 복사], [링크+제목 복사],
조회: 27148
글쓴 사람
정성태 (techsharer at outlook.com)
홈페이지
첨부 파일

“Make things as simple as possible, but not simpler.” [ManagedMsiExec sample app shows how to use the Windows Installer API from managed code]
; (broken) http://blogs.msdn.com/b/delay/archive/2012/01/09/make-things-as-simple-as-possible-but-not-simpler-managedmsiexec-sample-app-shows-how-to-use-the-windows-installer-api-from-managed-code.aspx
; https://dlaa.me/blog/post/10254645

msi.dll 파일을 interop해서 msiexec.exe를 .NET 버전으로 구현한 ManagedMsiExec를 공개하고 있습니다.

-----------------------------------------------
C:\T>ManagedMsiExec
SYNTAX: ManagedMsiExec <--Install|-i|--Uninstall|-u> Package.msi [--Verbose|-v]
Windows Installer result: 87 (INVALID_PARAMETER)

C:\T>ManagedMsiExec -i Package.msi
ManagedMsiExec: Installing C:\T\Package.msi
Windows Installer result: 0 (SUCCESS)

C:\T>ManagedMsiExec -u Package.msi
ManagedMsiExec: Uninstalling C:\T\Package.msi
Windows Installer result: 0 (SUCCESS)

C:\T>ManagedMsiExec -u Package.msi -v
ManagedMsiExec: Uninstalling C:\T\Package.msi
ACTIONSTART: Action 18:31:21: INSTALL.
INFO: Action start 18:31:21: INSTALL.
COMMONDATA: 1: 0 2: 1033 3: 1252
PROGRESS:
PROGRESS: 1: 2 2: 189440
COMMONDATA: 1: 0 2: 1033 3: 1252
INFO: This action is only valid for products that are currently installed.
C:\T\Package.msi
COMMONDATA: 1: 2 2: 0
COMMONDATA: 1: 2 2: 1
INFO: DEBUG: Error 2755: Server returned unexpected error 1605 attempting to
  install package C:\T\Package.msi.
ERROR: The installer has encountered an unexpected error installing this package.
  This may indicate a problem with this package. The error code is 2755.
INFO: Action ended 18:31:21: INSTALL. Return value 3.
TERMINATE:
Windows Installer result: 1603 (INSTALL_FAILURE)
-----------------------------------------------

소스 코드는 다음의 경로에서 받을 수 있는데,

ManagedMsiExec
; http://cesso.org/Samples/ManagedMsiExec/ManagedMsiExec.zip

언제 없어질지 모르니 ^^ 이 게시물에도 첨부를 해놓았으니 참고하세요. ^^








[최초 등록일: ]
[최종 수정일: 6/11/2021]


비밀번호

댓글 작성자
 




1  2  [3]  4  5  6  7  8  9  10  11  12  13  14  15  ...
NoWriterDateCnt.TitleFile(s)
1129정성태2/14/201120730.NET : 113. Running .NET applications in-process using AppDomains
1128정성태2/13/201121677개발 환경 구성: 143. Visual Studio 소스 서버 보안 경고창 없애기
1127정성태2/5/201121039개발 환경 구성: 142. Internet Explorer 6, 7, 8, 9 테스트 - 다중 XP Mode
1126정성태1/28/201127273개발 환경 구성: 141. 키보드 매핑을 바꾸는 레지스트리 설정파일 다운로드1
1125정성태12/24/201020051VS.NET IDE : 59. Visual Studio 2010 - 웹 프로젝트의 Web.debug.config / Web.Release.config 기능을 일반 프로젝트에 적용하는 방법
1124정성태11/16/201028660개발 환경 구성: 140. 대용량 파일 고속 전송: Rapidant
1123정성태11/11/201018500Web : 8. IE 9 플랫폼 프리뷰 6 + IE 9 베타
1122정성태11/9/201018774개발 환경 구성: 139. RemoteFX - USB Rediection
1121정성태11/6/201017865.NET : 112. The F# PowerPack, with F# Compiler Source Drops
1120정성태10/20/201019462Web : 7. Internet Explorer - Browser Mode 와 Document Mode
1119정성태10/9/201018697IIS : 32. Steps for setting up a custom identity of an IIS 6 application pool
1118정성태9/17/201017204Web : 6. Internet Explorer 9 Beta Guide for Developers
1117정성태8/25/201017471.NET : 111. Azure CDN Guide Available
1116정성태8/24/201017340Web : 5. IE 9 - UI 보더 변경에 따른 2-pixel 변화
1115정성태6/18/201018981개발 환경 구성: 138. 프로세스 덤프를 하는 다양한 방법
1114정성태6/1/201017348.NET : 110. C#5 and Meta-Programming [1]
1113정성태4/27/201018257VS.NET IDE : 58. Visual Studio 2010에 기본 내장된 WPF Tree Visualizer
1112정성태4/15/201018051개발 환경 구성: 137. How to enable remote connections in SQL Server 2008?
1111정성태4/2/201016637VS.NET IDE : 57. Simulating Peak Load with VS Load Tests
1110정성태3/30/201018023Windows 7: 4. Windows 7 / R2부터 제공되는 NT 서비스 전용 계정
1109정성태3/17/201018519개발 환경 구성: 136. SCVMM에서 VM을 Template로 만들어서 Library에 넣은 후 새로운 VM 배포하기
1107정성태3/1/201017854.NET : 109. .NET 4.0에서 obsolete로 처리되는 타입
1106정성태2/24/201018511IIS : 31. Microsoft Application Request Routing (ARR)과 TFS App Tier
1105정성태2/9/201017421Debug : 46. 프로세스 종료 시 덤프 남기는 방법
1104정성태1/26/201017749Debug : 45. Debugging References with Graph Visualizations
1103정성태11/18/200917089개발 환경 구성: 135. How to Configure WPL v1.0 SRE
1  2  [3]  4  5  6  7  8  9  10  11  12  13  14  15  ...