Microsoft MVP성태의 닷넷 이야기
.NET : 122. msiexec.exe를 닷넷으로 만들어 보면! [링크 복사], [링크+제목 복사],
조회: 20164
글쓴 사람
정성태 (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]


비밀번호

댓글 작성자
 




... [46]  47 
NoWriterDateCnt.TitleFile(s)
43정성태12/28/200410148VSMT 소개: Physical Server to Virtual Server
68정성태3/2/200510148    답변글 [추가]: VSMT 소개: ADS 1.0
42정성태12/27/20049528VS.NET 2005 : What should I do if I get a message that says, "Team system server is not available; please contact your system administrator."?
41정성태12/25/20049970Ten things to know before starting VSTS Foundation Server Installation
40정성태12/25/20049810SQL Server 2005 에서 반가운 기능 : 재귀 SELECT 와 ROW_NUMBER
39정성태12/24/20049033VS.NET 2005 : Navigate the .NET Framework and Your Projects with "My"파일 다운로드1
38정성태12/24/20049086Smart Client Architecture and Design Guide
37정성태12/24/20049705Translation Guide: Moving Your Programs from Managed Extensions for C++ to C++/CLI
36정성태12/23/2004939313가지 주의 사항: Visual C++ .NET 프로그램을 Visual Studio 2005로 이식하기 전에 알아야 할 13가지 내용
35정성태12/26/20049866Windows Sharepoint Services 를 설치한 이후 ASP.NET 오류 문제파일 다운로드1
34정성태12/9/200410036SQL Server 구성이 실패파일 다운로드1
33정성태12/7/20049905RSS 에 대한 자세한 설명
32정성태12/5/20049616How To Troubleshoot MS DTC Firewall Issues
31정성태12/5/20049391HOWTO: Enable DTC Between Web Servers and SQL Servers Running Windows Server 2003
29정성태12/4/20049420IP 변경하는 NETSH 명령
28정성태11/20/20049617혼합 DLL 로드 문제
27정성태11/20/20049358Web Services Enhancements 2.0을 사용한 프로그래밍
26정성태11/20/20049765SQL 주입 공격을 사전에 차단하는 방법
25정성태10/20/20049386Invoking .NET Events from Native C++
24정성태10/16/20048781Windows Rights Management 서비스(RMS) 1.0
23정성태10/16/20049514[ASP.NET] Working with Client-Side Script
21정성태10/3/20049573HOWTO: ASP.NET 유틸리티를 사용하여 자격 증명 및 세션 상태 연결 문자열 암호화
20정성태10/3/20049547IE 에서 XML 파일을 보는 경우, XMLDocument 를 얻어내는 방법.
22정성태10/3/200410282    답변글 [내용 보강] .NET 언어에서 IE에 보여진 XMLDocument 개체 접근하기
19정성태10/3/20049255.NET 리모팅에서 MBR 개체를 전송하는 경우의 xxx.exe.config 파일 설정방법
18정성태9/19/200410000HTML SELECT 요소에 OPTION 요소를 채우는 C/C++ 예제파일 다운로드1
... [46]  47