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-2026 SS64.com
Some rights reserved

AltStyle によって変換されたページ (->オリジナル) /