Microsoft® Windows® Script Host WindowStyle Property |
WSH Reference Version 1 |
Provides the window style of a shortcut object.
object.WindowStyle = intWindowStyle
Part Description object WshShortcut object. intWindowStyle Sets the window style of the program being run.
The following table lists the available settings for intWindowStyle:
intWindowStyle Description 1 Activates and displays a window. If the window is minimized or maximized, the system restores it to its original size and position. 3 Activates the window and displays it as a maximized window. 7 Minimizes the window and activates the next top-level window in the Z order.
The following example creates a shortcut to the currently executing script:Set WshShell = WScript.CreateObject("WScript.Shell") Set oShellLink = WshShell.CreateShortcut("Current Script.lnk") oShellLink.TargetPath = WScript.ScriptFullName oShellLink.WindowStyle = 1 oShellLink.Save