Quick References
      ADO
      ASP
      CSS2
      HTML
      JavaScript
      Jet SQL
      VBScript
      WML
      WMLScript
      WSH
      XHTML
      XML DOM
      XSLT

Features
      Knowledge Base
      Tutorials

Partners
     ZVON.ORG
     XML
     Planet Source Code
     VisualBuilder
     Web Design
     Your HTML Source
     XML/XSLT Forums
     ASPAlliance
     Scripts
     
     Programmers Heaven
     Tek-Tips Forums
     Developer Fusion
     Code Project











OBJECT:  WshShell

The WshShell object exposes some of the common shell functionalities of Microsoft Windows, making it easy to creates shortcuts, access the environment variables, run applications, access system registry, and more.

The WshShell object is not instantiated automatically upon script execution, hence it must be instantiated explicitly using CreateObject before it can be used.

PROPERTIES

Environment Property
The Environment property is read only and returns a WshEnvironment object.

Syntax: WshShell.Environment

SpecialFolders Property
The SpecialFolders property is read only and returns a WshSpecialFolders object.

Syntax: WshShell.SpecialFolders


 
METHODS

AppActivate Method
The AppActivate method activates an application.

Syntax: WshShell.AppActivate strAppTitle

CreateShortcut Method
The CreateShortcut method creates and returns a WshShortcut object.

Syntax: WshShell.CreateShortcut(strPathname)

ExpandEnvironmentStrings Method
The ExpandEnvironmentStrings method expands the environment variables in a string and returns the result string.

Syntax: WshShell.ExpandEnvironmentStrings(strString)

LogEvent Method
The LogEvent method logs an event in the Windows NT event log or WSH.log file.

Syntax: WshShell.LogEvent intType, strMessage [,strTarget]

Popup Method
The Popup method displays a pop-up message box.

Syntax: WshShell.Popup strText [,intSecondsToWait] [,strTitle] [,intType]

RegDelete Method
The RegDelete method removes a registry entry based on strName.

Syntax: WshShell.RegDelete strName

RegRead Method
The RegRead method reads and returns a registry entry based on strName.

Syntax: WshShell.RegRead(strName)

RegWrite Method
The RegWrite method writes a new entry into the registry.

Syntax: WshShell.RegWrite strName, varValue [,strType]

Run Method
The Run method runs an application in a new process.

Syntax: WshShell.Run strCommand [,intWindowStyle] [,bWaitOnReturn]

SendKeys Method
The SendKeys method sends keystrokes to the active window. Similar to VB's SendKeys statement.

Syntax: WshShell.SendKeys strKeyString

 


Copyright 1999-2005 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information