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
Syntax
Set objShell = CreateObject("Shell.Application")
Methods
.CanStartStopService("ServiceName") 'Can the current user start/stop the named service?
.CascadeWindows 'Arrange app windows
.EjectPC 'Eject PC from a docking station
.Explore(FolderPath) 'Open a folder
.FileRun 'Open the File-run dialogue
.GetSystemInformation("PhysicalMemoryInstalled") 'Physical memory installed, in bytes.
.IsServiceRunning("ServiceName") 'Check if a Windows service is running
.MinimizeAll 'Minimize everything
.NameSpace("C:\\") 'Create an object reference to a folder
.ServiceStart("ServiceName", true) 'Start a windows service
.ServiceStop("ServiceName", true) 'Stop a windows service
.SetTime 'Open the set time GUI
.ShellExecute 'Run a script or application
.ShutdownWindows
.TileHorizontally 'Tile app windows
.TileVertically 'Tile app windows
.ToggleDesktop 'Show/Hide Desktop
.TrayProperties 'Display the Taskbar/Start Menu Properties
.UndoMinimizeAll 'Un-Minimize everything
Example
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:
.AppActivate - Activate running command.
.Application BrowseForFolder/Open
.Run a command.