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.
![](collapse_all.gif)
C# | Visual Basic | Visual C++ |
![](collapse_all.gif)
- 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
![](collapse_all.gif)
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.