All Properties
Property: WshShortcut.WindowStyle
object.
WindowStyle
The
WindowStyle
property sets or retrieves how the application pointed to by the shortcut will be displayed when it is first launched. If
WindowStyle
is 1, then the application window will be set to its default location and size. If this property has a value of 3, the application will be launched in a maximized window, and if it has a value of 7 it will be launched in a minimized window.
If a value other than 1, 3, or 7 is assigned to this property, the shortcut will be launched in a window at the default location and of the default size.
The following VBScript code sets the shortcut "WinZip.lnk" to be launched in a minimized window.
Code:
Set objShell = WScript.CreateObject("WScript.Shell")
Set objShtCut = objShell.CreateShortcut _
("C:\Documents And Settings\DevGuru\Desktop\WinZip.lnk")
objShtCut.WindowStyle = 7
objShtCut.Save
WScript.Echo objShtCut.WindowStyle
Output:
7
Copyright 1999-2001 by Infinite Software Solutions, Inc. All rights reserved.
Trademark Information