Deployment Tools Foundation
AdvertiseScript Method (scriptFile, flags, removeItems)
Deployment Tools Foundation Namespaces ► Microsoft.Deployment.WindowsInstaller ► Installer ► AdvertiseScript(String, Int32, Boolean)
Copies an advertise script file to the local computer.
Declaration Syntax
C# | Visual Basic | Visual C++ | F# |
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 )
static member AdvertiseScript : scriptFile : string * flags : int * removeItems : bool -> unit
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.dll) Version: 3.0.0.0 (3.11.1.2318)