AdvertiseScript Method (scriptFile, flags, removeItems)

Microsoft Deployment Tools

Deployment Tools Foundation AdvertiseScript Method (scriptFile, flags, removeItems)
Deployment Tools Foundation NamespacesMicrosoft.Deployment.WindowsInstallerInstallerAdvertiseScript(String, Int32, Boolean)
Copies an advertise script file to the local computer.
Declaration Syntax
C# Visual Basic Visual C++
public static void AdvertiseScript(
	string scriptFile,
	int flags,
	bool removeItems
)
Public Shared Sub AdvertiseScript ( _
	scriptFile As String, _
	flags As Integer, _
	removeItems As Boolean _
)
public:
static void AdvertiseScript(
	String^ scriptFile, 
	int flags, 
	bool removeItems
)
Parameters
scriptFile (String)
Path to a script file generated by GenerateAdvertiseScript(String, String, String, Int32, ProcessorArchitecture, Boolean)
flags (Int32)
Flags controlling advertisement
removeItems (Boolean)
True if specified items are to be removed instead of being created
Remarks

The process calling this function must be running under the LocalSystem account. To advertise an application for per-user installation to a targeted user, the thread that calls this function must impersonate the targeted user. If the thread calling this function is not impersonating a targeted user, the application is advertised to all users for installation with elevated privileges.

Assembly: Microsoft.Deployment.WindowsInstaller (Module: Microsoft.Deployment.WindowsInstaller) Version: 3.0.0.0 (3.5.1623.0)