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


비밀번호

댓글 작성자
 




... 31  32  33  34  35  36  [37]  38  39  40  41  42  43  44  45  ...
NoWriterDateCnt.TitleFile(s)
269정성태5/4/20069016Visual Studio 2005 Team System Level 200 Course Material
268정성태5/4/20069286Microsoft Component Installer Software Development Kit for Windows (x86) Version 2.0
267정성태5/4/20069190101 Code Samples for Visual Basic 2005
266정성태5/3/200611021Consolas Font Pack for Microsoft Visual Studio 2006 [2]
264정성태5/1/200610194Team System for C++ Developers
262정성태5/1/200619775Registry 등록 없이 COM 개체 사용 [1]파일 다운로드2
261정성태4/30/2006100344GB 메모리 인식 [2]
259정성태4/30/20069098Building ASP.NET 2.0 Web Sites Using Web Standards
260정성태4/30/20068812    답변글 XHTML Validator Modulle
258정성태4/29/20069390WebServiceStudio 2.0
263정성태5/1/20069032    답변글 Calling an Arbitrary Web Service
257정성태4/29/20069002TypeForwardedToAttribute
256정성태4/29/20069260Windows API - Using Condition Variables
252정성태4/26/20069458한글 관련 메세지 정리파일 다운로드1
251정성태4/26/20069914IIS 7.0 에서 소개되는 새로운 기능들 [1]
250정성태4/25/200610626툴 소개: VisualNDepend
249정성태4/25/200616615Integrating a debugger into Reflector
265정성태5/1/200610862    답변글 Deblector: First Version
285정성태5/15/20068968    답변글 New Deblector version ( an Add-In to debug with reflector )
248정성태4/21/20069319VS.NET 2005 Add-In : CSS Properties Window
247정성태4/21/20069254VS.NET 2005 Add-In : Spell Checker for HTML and ASP.NET pages
244정성태4/19/20069216SQL Server 2005 Service Pack 1
241정성태4/19/20068678VSTS Annotations for C++: Beyond Just Documenting Method Behavior [1]파일 다운로드1
240정성태4/18/20069306Accessing System Power and Network Status Using SENS
253정성태4/29/20069656    답변글 [HowToUse]: Accessing System Power and Network Status Using SENS
239정성태4/18/20069236Display a Web Page in a Plain C Win32 Application
... 31  32  33  34  35  36  [37]  38  39  40  41  42  43  44  45  ...