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


비밀번호

댓글 작성자
 




... 16  [17]  18  19  20  21  22  23  24  25  26  27  28  29  30  ...
NoWriterDateCnt.TitleFile(s)
775정성태6/11/200712003TFS : 105. Visual Studio Team Foundation Server ? Project Server 2007 Connector
774정성태6/10/200712004.NET 3.5 : 24. F#, Cω 를 통해보는 C# 3.0 기능들
773정성태6/10/200712521Vista : 45. HOW-TO: Disable Automatic Folder Type Discovery
772정성태6/9/200711032Debug : 20. How Windows Shuts Down
771정성태6/9/200711233VS.NET IDE : 34. .NET Client Application Services [1]
770정성태6/9/200710661TFS : 104. 팀 빌드 스케줄링
769정성태6/9/200711572.NET 3.5 : 23. the red bits and the green bits
768정성태6/9/200711717.NET 3.5 : 22. System.TimeZoneInfo
767정성태6/9/200711815Vista : 44. 이동 가능한 드라이브에 BitLocker 적용
766정성태6/9/200711107개발 환경 구성: 99. Virtualisation White Paper
765정성태6/9/200713977Debug : 19. IsDebuggerPresent API 이야기
764정성태6/6/200711173VS.NET IDE : 33. Visual Studio 2008 Shell - 사용자 정의 가능한 쉘 환경 구현
763정성태6/6/200710526.NET : 59. 스마트 클라이언트의 미래 - Acropolis
762정성태6/5/200710940.NET 3.5 : 21. VB.NET LINQ Hands On Labs for Orcas Beta 1
761정성태6/5/200710638Visual C++ : 10. C++-0x
760정성태6/1/200711132.NET 3.5 : 20. Jasper 프로젝트 문서
759정성태5/30/200710244TFS : 103. SDC - MSBuild Task Library
758정성태5/25/200710476.NET 3.5 : 19. LINQ to XSD Preview Alpha 0.2
757정성태5/25/200710434TFS : 102. SnagIt Output
756정성태5/25/20079095.NET : 58. IL inline 툴
755정성태5/24/20079982TFS : 101. Team Foundation Server Guide (beta1)
754정성태5/22/20079482SDK : 8. Microsoft Windows MultiPoint Software Development Kit (SDK) - CTP 2
753정성태5/22/200711031.NET 3.5 : 18. WCF 신규 바인딩 - WebHttpBinding
752정성태5/22/200712219Debug : 18. 무한 루프에 빠졌을 때.
751정성태5/22/200710153TFS : 100. LogParser 와 TFS
750정성태5/18/200711051IIS : 15. WCAT 6.3
... 16  [17]  18  19  20  21  22  23  24  25  26  27  28  29  30  ...