11.07.2015 Views

VBScript Reference Manual for InduSoft Web Studio - ICP DAS

VBScript Reference Manual for InduSoft Web Studio - ICP DAS

VBScript Reference Manual for InduSoft Web Studio - ICP DAS

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

<strong>InduSoft</strong> <strong>Web</strong> <strong>Studio</strong><strong>VBScript</strong> <strong>Reference</strong> <strong>Manual</strong>connection string to the database Provider (an object that interacts with the physical database). Thereare various ADODB Objects and Collections available to the developer.ADOX is Microsoft’s ActiveX Data Object Extensions <strong>for</strong> Data Definition Language (database schemacreation, modification and deletion) and Security. It is a companion set of Objects to the core ADO.NETobjects.Microsoft Office Automation<strong>VBScript</strong> can access the various Microsoft Office Automation COM servers. These include:• Microsoft Access (“Access.Application”)• Microsoft Excel (“Excel.Application”)• Microsoft Word (“Word.Application”)• Microsoft Outlook (“Outlook.Application”)• Microsoft Graph• Microsoft Excel Chart (“Excel.Chart”)To instantiate a Excel and a Word Application, <strong>for</strong> example, we would use the following <strong>VBScript</strong>statements:Set objXL = CreateObject(“Excel.Application”)Set objWrd = CreateObject(“Word.Application”)Once the Microsoft Office COM object is instantiated, the <strong>VBScript</strong> Programmer can access the variousProperties and Methods. Using <strong>VBScript</strong>, objects can be moved from one Microsoft application toanother.WMIWindows Management Instrumentation, or WMI, is a set of extensions to the Windows Driver Modelthat provide an interface from a program (such as <strong>VBScript</strong>) into various components of the Windowsoperating system to retrieve in<strong>for</strong>mation and notification. Using WMI and <strong>VBScript</strong>, management ofWindows-based PCs and Servers can be accomplished either locally or remotely. WMI is based on theCommon In<strong>for</strong>mation Model (CIM), allowing a uni<strong>for</strong>m methodology of managing various Windowscomponents. WMI is available to all .NET applications and is supported under Windows 2000, XP orServer 2003, but not Windows CE at present. Examples of Microsoft Windows components accessiblethrough WMI include:• Control Panel (can manipulate basic system settings and controls)• Device Manager (display and control hardware added to the PC, which drivers are used)• Event Viewer (view the system event log locally or remotely)• RegEdit (Windows Registry Editor)• Various applications (Notepad, Command.Com and Cmd.exe)• Windows Core ComponentsWindows Script HostWindows Script Host, or WSH, is the successor to the Batch File first introduced <strong>for</strong> DOS. WSHautomates system administration tasks, and supports multi-lingual scripting including <strong>VBScript</strong>. Scriptscan be run locally, or on remote computers. There are several WSH objects including:• WScript Object (not available from IWS, since IWS is the host)• WshShell (allows scripts to work with the Windows Shell – e.g. read/write to registry, shortcuts,system administration tasks, running programs)• WshNetwork (manages network drives and printers)• WshController (runs scripts locally or remotely)<strong>InduSoft</strong>, Ltd. 41

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!