The Wscript.Shell object

Provides access to OS Shell methods.

Syntax 
      Set objShell = CreateObject("Wscript.Shell") 

Methods
   .AppActivate      'Activate running command.
   .Run              'Run an application.
   .TileVertically   'Tile app windows.
   .RegRead          'Read from registry.
   .RegDelete        'Delete from registry.
   .RegWrite         'Write to the registry.

Examples

Set an object to a file folder and then use .Run to open File Explorer at that folder:

Dim objShell
Set objShell = WScript.CreateObject("WScript.Shell")
objShell.Run "C:\Demo"
Set objShell = Nothing

“It is possible to store the mind with a million facts and still be entirely uneducated” ~ Alec Bourne

Related VBScript commands

.AppActivate - Activate running command.
Shell.Application - The Shell.Application object.
.Run a command.


 
Copyright © 1999-2025 windevcluster.com
Some rights reserved