IWMSActiveScriptAdmin.FileName (C#)
.gif)
| Previous | Next |
IWMSActiveScriptAdmin.FileName (C#)
The FileName property specifies and retrieves the path to the script file.
Syntax
IWMSActiveScriptAdmin .FileName = string; string = IWMSActiveScriptAdmin.FileName;
Property Value
A string containing the error text.
Example Code
using Microsoft.WindowsMediaServices.Interop;
using System.Runtime.InteropServices;
// Declare variables.
WMSServer Server;
IWMSPlugin Plugin;
IWMSActiveScriptAdmin ActiveScriptAdmin;
try {
// Create a new WMSServer object.
Server = new WMSServerClass();
// Retrieve the plug-in to be configured.
Plugin = Server.EventHandlers[
"WMS Active Script Event Handler"];
// Retrieve the custom interface of the plug-in.
ActiveScriptAdmin =
(IWMSActiveScriptAdmin)Plugin.CustomInterface;
// Set the current script file name.
ActiveScriptAdmin.FileName = "C:\\Scripts\\TestScript.vbs";
}
catch (COMException comExc) {
// TODO: Handle COM exceptions.
}
catch (Exception e) {
// TODO: Handle exceptions.
}
Requirements
Reference: Add a reference to Microsoft.WindowsMediaServices.
Namespace: Microsoft.WindowsMediaServices.Interop.
Assembly: Microsoft.WindowsMediaServices.dll.
Library: WMSServerTypeLib.dll.
Platform: Windows ServerĀ 2003 family, Windows ServerĀ 2008 family.
See Also
| Previous | Next |