Insider Power Techniques for Microsoft Windows XP [Electronic resources] نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Insider Power Techniques for Microsoft Windows XP [Electronic resources] - نسخه متنی

Paul McFedries

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
توضیحات
افزودن یادداشت جدید




Running Applications

When you need your script to launch another application, use WshShell’s Run method:

Run strCommand, [intWindowStyle], [bWaitOnReturn]







































strCommand


The name of the file that starts the application. Unless the file is in the Windows folder, you should include the drive and path to make sure that the script can find the file.



intWindowStyle


A constant or number that specifies how the application window will appear. These are some of the more useful values:






intWindowStyle


Window Appearance





0


Hidden





1


Normal size with focus





2


Minimized with focus (this is the default)





3


Maximized with focus






intWindowStyle


Window Appearance





4


Normal without focus





6


Minimized without focus



bWaitOnReturn


A Boolean value that determines whether the application is run asynchronously. If this value is True, the script halts execution until the user exits the launched application; if this value is False, the script continues running once it has launched the application.



Here’s an example:

Set objWshShell = WScript.CreateObject(“WScript.Shell”)
objWshShell.Run “CONTROL.EXE INETCPL.CPL", 1, True

This Run method launches Control Panel’s Internet Properties dialog box in a normal-sized window, gives control to the dialog box, and waits for the user to close the dialog box before control returns to the script, which immediately exits.





Note

To learn more about launching individual Control Panel icons using Control.exe, please see Chapter 1, “Mastering Control Panel, Policies, and PowerToys.


/ 126