Installer::AdvertiseScript 메서드

Installer 개체의 AdvertiseScript 메서드는 설치 패키지를 보급합니다.

구문

.AdvertiseScript(
  scriptPath,
  scriptFlags,
  removeItems
)

매개 변수

scriptPath

CreateAdvertiseScript 메서드에서 생성된 스크립트 파일의 전체 경로입니다.

scriptFlags

보급을 제어하는 플래그입니다. 이 매개 변수는 다음 값의 조합일 수 있습니다.

의미
msiAdvertiseScriptCacheInfo
0x001
아이콘을 만들거나 제거해야 하는 경우 이 플래그를 포함합니다.
msiAdvertiseScriptShortcuts
0x004
바로 가기를 만들거나 제거해야 하는 경우 이 플래그를 포함합니다.
msiAdvertiseScriptMachineAssign
0x008
제품을 컴퓨터에 할당할 경우 이 플래그를 포함합니다.
msiAdvertiseScriptConfigurationRegistration
0x020
레지스트리 데이터의 구성 및 관리 정보를 작성하거나 제거해야 하는 경우 이 플래그를 포함합니다.
msiAdvertiseScriptValidateTransformList
0x040
이 제품에 대해 이전에 등록된 변환에 따라 스크립트에 나열된 변환의 유효성 검사를 시행하려면 이 플래그를 포함합니다. 변환 충돌은 대/소문자를 구분하지 않는 문자열 비교를 사용하여 검색되며 모든 설치 컨텍스트에서 사용자별 설치와 컴퓨터별 설치 간에 평가됩니다.
msiAdvertiseScriptClassInfoRegistration
0x080
COM 클래스와 관련된 레지스트리의 보급 정보를 작성하거나 제거해야 하는 경우 이 플래그를 포함합니다.
msiAdvertiseScriptExtensionInfoRegistration
0x100
확장과 관련된 레지스트리의 보급 정보를 작성하거나 제거해야 하는 경우 이 플래그를 포함합니다.
msiAdvertiseScriptAppInfo
0x180
레지스트리의 보급 정보를 작성하거나 제거해야 하는 경우 이 플래그를 포함합니다.
msiAdvertiseScriptRegData
0x1A0
레지스트리의 보급 정보를 작성하거나 제거해야 하는 경우 이 플래그를 포함합니다.

 

removeItems

지정된 항목이 만들어지는 대신 제거되는 경우 TRUE입니다.

반환 값

이 메서드는 값을 반환하지 않습니다.

설명

AdvertiseScript 메서드는 MsiAdvertiseScript 함수를 사용합니다. AdvertiseScript 메서드를 사용하려면 스크립트가 로컬 시스템 프로세스 내에서 실행되어야 합니다.

예제

다음 예제에서는 AdvertiseScript 메서드를 사용하는 방법을 보여줍니다.

Dim installer
Set installer = CreateObject("WindowsInstaller.Installer")

' Advertise Simple package using an advertise script
'   created by CreateAdvertiseScript Method
'
'  Flags 424 indicate msiAdvertiseScriptMachineAssign, msiAdvertiseScriptRegData

Installer.AdvertiseScript "c:\scratch\simpletst\rtm\simple.aas", 424, false

' Verify Simple is installed
MsgBox Installer.ProductState("{BAE98781-CF88-4309-8E2D-3D8B347F5B53}")

'
' Remove Simple using advertise script
'
Installer.AdvertiseScript "c:\scratch\simpletst\rtm\simple.aas", 424, true

' Verify simple is removed
MsgBox Installer.ProductState("{BAE98781-CF88-4309-8E2D-3D8B347F5B53}")

요구 사항

요구 사항
버전
Windows Server 2012, Windows 8, Windows Server 2008 R2 또는 Windows 7의 Windows Installer 5.0. Windows Server 2008 또는 Windows Vista의 Windows Installer 4.0 또는 Windows Installer 4.5. Windows Server 2003 및 Windows XP의 Windows Installer 4.5
DLL
Msi.dll
IID
IID_IInstaller는 000C1090-0000-0000-C000-000000000046으로 정의됩니다.

추가 정보

설치 관리자

Windows Installer 3.1 및 이전 버전에서 지원되지 않음