- Use Shell Launcher to create a Windows 10 kiosk
- Differences between Shell Launcher v1 and Shell Launcher v2
- Requirements
- Enable Shell Launcher feature
- Configure a custom shell in MDM
- XML for Shell Launcher configuration
- Custom OMA-URI setting
- Configure a custom shell using PowerShell
- default action, custom action, exit code
- Launching Applications (ShellExecute, ShellExecuteEx, SHELLEXECUTEINFO)
- Using ShellExecute and ShellExecuteEx
- Object Verbs
- Using ShellExecuteEx to Provide Activation Services from a Site
- Using ShellExecute to Launch the Search Dialog Box
- A Simple Example of How to Use ShellExecuteEx
- Объект Shell
- 1. Создание объекта
- 2. Свойства
- 2.1. Application
- 2.2. Parent
- 3. Методы
- 3.1. MinimizeAll
- 3.2. UndoMinimizeAll
- 3.3. TileHorizontally
- 3.4. TileVertically
- 3.5. CascadeWindows
- 3.6. Explore
- 3.7. Open
- 3.8. NameSpace
- 3.9. FileRun
- 3.10. FindComputer
- 3.11. FindFiles
- 3.12. FindPrinter
- 3.13. Help
- 3.14. ShutdownWindows
- 3.15. SetTime
- 3.16. TrayProperties
- 3.17. ControlPanelItem
- 3.18. BrowseForFolder
- 3.19. Windows
- 3.20. CanStartStopService
- 3.21. IsServiceRunning
- 3.22. ServiceStart
- 3.23. ServiceStop
- 3.24. GetSystemInformation
- 3.25. IsRestricted
- 3.26. ShellExecute
- 3.27. ShowBrowserBar
- 3.28. AddToRecent
- 3.29. ExplorerPolicy
- 3.30. GetSetting
- 3.31. ToggleDesktop
- 3.32. WindowsSecurity
- 4. Объект Folder
- 4.1. Создание объекта
- 4.2. Свойства
- 4.2.1. Title
- 4.2.2. Self
- 4.2.3. ParentFolder
- 4.2.4. Application
- 4.2.5. OfflineStatus
- 4.3. Методы
- 4.3.1. NewFolder
- 4.3.2. CopyHere
- 4.3.3. MoveHere
- 4.3.4. Items
- 4.3.5. ParseName
- 4.3.6. GetDetailsOf
- 4.3.7. DismissedWebViewBarricade
- 4.3.8. Synchronize
- 5. Объект FolderItems
- 5.1. Создание объекта
- 5.2. Свойства
- 5.2.1. Application
- 5.2.2. Count
- 5.2.3. Verbs
- 5.3. Методы
- 5.3.1. Item
- 5.3.2. InvokeVerbEx
- 5.3.3. Filter
Use Shell Launcher to create a Windows 10 kiosk
Applies to
Using Shell Launcher, you can configure a device that runs an application as the user interface, replacing the default shell (explorer.exe). In Shell Launcher v1, available in Windows 10, you can only specify a Windows desktop application as the replacement shell. In Shell Launcher v2, available in Windows 10, version 1809 and above, you can also specify a UWP app as the replacement shell. To use Shell Launcher v2 in version 1809, you need to install the KB4551853 update.
Shell Launcher controls which application the user sees as the shell after sign-in. It does not prevent the user from accessing other desktop applications and system components.
Methods of controlling access to other desktop applications and system components can be used in addition to using the Shell Launcher. These methods include, but are not limited to:
- Group Policy — example: Prevent access to registry editing tools
- AppLocker — Application control policies
- Mobile Device Management — Enterprise management of device security policies
You can apply a custom shell through Shell Launcher by using PowerShell. In Windows 10, version 1803 and later, you can also use mobile device management (MDM) to apply a custom shell through Shell Launcher.
Differences between Shell Launcher v1 and Shell Launcher v2
Shell Launcher v1 replaces explorer.exe , the default shell, with eshell.exe which can launch a Windows desktop application.
Shell Launcher v2 replaces explorer.exe with customshellhost.exe . This new executable file can launch a Windows desktop application or a UWP app.
In addition to allowing you to use a UWP app for your replacement shell, Shell Launcher v2 offers additional enhancements:
- You can use a custom Windows desktop application that can then launch UWP apps, such as Settings and Touch Keyboard.
- From a custom UWP shell, you can launch secondary views and run on multiple monitors.
- The custom shell app runs in full screen, and can run other apps in full screen on user’s demand.
For sample XML configurations for the different app combinations, see Samples for Shell Launcher v2.
Requirements
Windows 10 doesn’t support setting a custom shell prior to OOBE. If you do, you won’t be able to deploy the resulting image.
Shell Launcher doesn’t support a custom shell with an application that launches a different process and exits. For example, you cannot specify write.exe in Shell Launcher. Shell Launcher launches a custom shell and monitors the process to identify when the custom shell exits. Write.exe creates a 32-bit wordpad.exe process and exits. Because Shell Launcher is not aware of the newly created wordpad.exe process, Shell Launcher will take action based on the exit code of Write.exe, such as restarting the custom shell.
A domain, Azure Active Directory, or local user account.
A Windows application that is installed for that account. The app can be your own company application or a common app like Internet Explorer.
Enable Shell Launcher feature
To set a custom shell, you first turn on the Shell Launcher feature, and then you can set your custom shell as the default using PowerShell or MDM.
To turn on Shell Launcher in Windows features
Go to Control Panel > Programs and features > Turn Windows features on or off.
Expand Device Lockdown.
Select Shell Launcher and OK.
Alternatively, you can turn on Shell Launcher using Windows Configuration Designer in a provisioning package, using SMISettings > ShellLauncher , or you can use the Deployment Image Servicing and Management (DISM.exe) tool.
To turn on Shell Launcher using DISM
Open a command prompt as an administrator.
Enter the following command.
Configure a custom shell in MDM
You can use XML and a custom OMA-URI setting to configure Shell Launcher in MDM.
XML for Shell Launcher configuration
The following XML sample works for Shell Launcher v1:
For Shell Launcher v2, you can use UWP app type for Shell by specifying the v2 namespace, and use v2:AppType to specify the type, as shown in the following example. If v2:AppType is not specified, it implies the shell is Win32 app.
In the XML for Shell Launcher v2, note the AllAppsFullScreen attribute. When set to True, Shell Launcher will run every app in full screen, or maximized for desktop apps. When this attribute is set to False or not set, only the custom shell app runs in full screen; other apps launched by the user will run in windowed mode.
Custom OMA-URI setting
In your MDM service, you can create a custom OMA-URI setting to configure Shell Launcher v1 or v2. (The XML that you use for your setting will determine whether you apply Shell Launcher v1 or v2.)
The OMA-URI path is ./Device/Vendor/MSFT/AssignedAccess/ShellLauncher .
For the value, you can select data type String and paste the desired configuration file content into the value box. If you wish to upload the xml instead of pasting the content, choose data type String (XML file) .
After you configure the profile containing the custom Shell Launcher setting, select All Devices or selected groups of devices to apply the profile to. Don’t assign the profile to users or user groups.
Configure a custom shell using PowerShell
For Shell Launcher v1, modify the following PowerShell script as appropriate. The comments in the sample script explain the purpose of each section and tell you where you will want to change the script for your purposes. Save your script with the extension .ps1, open Windows PowerShell as administrator, and run the script on the kiosk device.
default action, custom action, exit code
Shell launcher defines 4 actions to handle app exits, you can customize shell launcher and use these actions based on different exit code.
Value | Description |
---|---|
0 | Restart the shell |
1 | Restart the device |
2 | Shut down the device |
3 | Do nothing |
These action can be used as default action, or can be mapped to a specific exit code. Refer to Shell Launcher to see how these codes with Shell Launcher WMI.
Launching Applications (ShellExecute, ShellExecuteEx, SHELLEXECUTEINFO)
Once your application has located a file object, the next step is often to act on it in some way. For instance, your application might want to launch another application that allows the user to modify a data file. If the file of interest is an executable, your application might want to simply launch it. This document discusses how to use ShellExecute or ShellExecuteEx to perform these tasks.
Using ShellExecute and ShellExecuteEx
To use ShellExecute or ShellExecuteEx, your application must specify the file or folder object that is to be acted on, and a verb that specifies the operation. For ShellExecute, assign these values to the appropriate parameters. For ShellExecuteEx, fill in the appropriate members of a SHELLEXECUTEINFO structure. There are also several other members or parameters that can be used to fine-tune the behavior of the two functions.
File and folder objects can be part of the file system or virtual objects, and they can be identified by either paths or pointers to item identifier lists (PIDLs).
Object Verbs
The verbs available for an object are essentially the items that you find on an object’s shortcut menu. To find which verbs are available, look in the registry under
HKEY_CLASSES_ROOT\CLSID\ \Shell\verb
where object_clsid is the class identifier (CLSID) of the object, and verb is the name of the available verb. The verb\command subkey contains the data indicating what happens when that verb is invoked.
To find out which verbs are available for predefined Shell objects, look in the registry under
HKEY_CLASSES_ROOT\object_name\shell\verb
where object_name is the name of the predefined Shell object. Again, the verb\command subkey contains the data indicating what happens when that verb is invoked.
Commonly available verbs include:
Verb | Description |
---|---|
edit | Launches an editor and opens the document for editing. |
find | Initiates a search starting from the specified directory. |
open | Launches an application. If this file is not an executable file, its associated application is launched. |
Prints the document file. | |
properties | Displays the object’s properties. |
runas | Launches an application as Administrator. User Account Control (UAC) will prompt the user for consent to |
run the application elevated or enter the credentials of an administrator account used to run the | |
application. |
Each verb corresponds to the command that would be used to launch the application from a console window. The open verb is a good example, as it is commonly supported. For .exe files, open simply launches the application. However, it is more commonly used to launch an application that operates on a particular file. For instance, .txt files can be opened by Microsoft WordPad. The open verb for a .txt file would thus correspond to something like the following command:
When you use ShellExecute or ShellExecuteEx to open a .txt file, Wordpad.exe is launched with the specified file as its argument. Some commands can have additional arguments, such as flags, that can be added as needed to launch the application properly. For further discussion of shortcut menus and verbs, see Extending Shortcut Menus.
In general, trying to determine the list of available verbs for a particular file is somewhat complicated. In many cases, you can simply set the lpVerb parameter to NULL, which invokes the default command for the file type. This procedure is usually equivalent to setting lpVerb to «open», but some file types may have a different default command. For further information, see Extending Shortcut Menus and the ShellExecuteEx reference documentation.
Using ShellExecuteEx to Provide Activation Services from a Site
A site chain’s services can control many behaviors of item activation. As of WindowsВ 8, you can provide a pointer to the site chain to ShellExecuteEx to enable these behaviors. To provide the site to ShellExecuteEx:
- Specify the SEE_MASK_FLAG_HINST_IS_SITE flag in the fMask member of SHELLEXECUTEINFO.
- Provide the IUnknown in the hInstApp member of SHELLEXECUTEINFO.
Using ShellExecute to Launch the Search Dialog Box
When a user right-clicks a folder icon in Windows Explorer, one of the menu items is «Search». If they select that item, the Shell launches its Search utility. This utility displays a dialog box that can be used to search files for a specified text string. An application can programmatically launch the Search utility for a directory by calling ShellExecute, with «find» as the lpVerb parameter, and the directory path as the lpFile parameter. For instance, the following line of code launches the Search utility for the c:\MyPrograms directory.
A Simple Example of How to Use ShellExecuteEx
The following sample console application illustrates the use of ShellExecuteEx. Most error checking code has been omitted for clarity.
The application first retrieves the PIDL of the Windows directory, and enumerates its contents until it finds the first .bmp file. Unlike the earlier example, IShellFolder::GetDisplayNameOf is used to retrieve the file’s parsing name instead of its display name. Because this is a file system folder, the parsing name is a fully qualified path, which is what is needed for ShellExecuteEx.
Объект Shell
1. Создание объекта
Не все объекты, их свойства и методы будут работать на всех версиях Windows. Подробности — см. MSDN (часто проще проверить работоспособность кода экспериментально). Устанавливайте обновления для Internet Explorer. Некоторые методы доступны или имеют смысл только в контексте HTML-документа.
При использовании свойств и методов объекта Shell, возвращающих агрегатные объекты, в VBScript желательно всегда обрабатывать исключения и проверять полученный объект на существование (сравнивать с Nothing). Объект типа «IShellDispatch» возвращается также в таких случаях:
2. Свойства
2.1. Application
Возвращаемое значение: объект «IShellDispatch».
Замечание: только чтение.
2.2. Parent
Возвращаемое значение: объект «IShellDispatch».
Замечание: только чтение.
3. Методы
3.1. MinimizeAll
Назначение: сворачивание всех окон рабочего стола Windows. Возвращаемого значения нет.
Описание: вызов метода приводит к тому же эффекту, что и команда «Показать рабочий стол» («Minimize All Windows») контекстного меню панели задач Windows или щелчок по значку «Свернуть все окна» («Show Desktop») на панели «Быстрый запуск» («Quick Launch») панели задач Windows.
3.2. UndoMinimizeAll
Назначение: восстановление всех свёрнутых окон рабочего стола Windows. Возвращаемого значения нет.
Описание: вызов метода приводит к тому же эффекту, что и команда «Отменить Свернуть все» («Undo Minimize All Windows») контекстного меню панели задач Windows или повторный щелчок по значку «Свернуть все окна» («Show Desktop») на панели «Быстрый запуск» («Quick Launch») панели задач Windows.
3.3. TileHorizontally
Назначение: упорядочение окон рабочего стола Windows по горизонтали. Возвращаемого значения нет.
Описание: вызов метода приводит к тому же эффекту, что и команда «Окна сверху вниз» («Tile Windows Horizontally») контекстного меню панели задач Windows.
3.4. TileVertically
Назначение: упорядочение окон рабочего стола Windows по вертикали. Возвращаемого значения нет.
Описание: вызов метода приводит к тому же эффекту, что и команда «Окна слева направо» («Tile Windows Vertically») контекстного меню панели задач Windows.
3.5. CascadeWindows
Назначение: расположение всех несвёрнутых окон рабочего стола Windows каскадом. Возвращаемого значения нет.
Описание: вызов метода приводит к тому же эффекту, что и команда «Окна каскадом» («Cascade Windows») контекстного меню панели задач Windows.
3.6. Explore
Назначение: запуск проводника Windows с определённой открытой папкой. Возвращаемого значения нет.
— путь к открываемой папке. Тип — строка.
может быть числом, определяющим одну из специальных папок Windows. Коды папок — см. описание метода «NameSpace».
3.7. Open
Назначение: запуск проводника Windows с определённой открытой папкой. Возвращаемого значения нет.
— путь к открываемой папке. Тип — строка.
может быть числом, определяющим одну из специальных папок Windows. Коды папок — см. описание метода «NameSpace».
3.8. NameSpace
Назначение: получение объекта виртуальной папки проводника. Возвращает объект «Folder».
— путь к папке или диску. Тип — строка.
может быть числом, определяющим одну из специальных папок Windows.
3.9. FileRun
Назначение: вызов окна «Запуск программы» («Run»). Возвращаемого значения нет.
Описание: вызов метода приводит к тому же эффекту, что и команда меню «Пуск»-«Выполнить» («Start»-«Run»).
3.10. FindComputer
Назначение: вызов окна проводника Windows «Результаты поиска — компьютеры» («Search Results — Computers»). Возвращаемого значения нет.
3.11. FindFiles
Назначение: вызов окна проводника Windows «Результаты поиска» («Find: All Files»). Возвращаемого значения нет.
Описание: вызов метода приводит к тому же эффекту, что и команда меню «Пуск»-«Поиск» («Start»-«Find»).
3.12. FindPrinter
Назначение: вызов окна «Поиск принтеров» («Find Printers») в Active Directory с предварительным заполнением параметров поиска. Возвращаемого значения нет.
- — необязательный. Строка — имя принтера.
- — необязательный. Строка — местоположение принтера.
- — необязательный. Строка — модель принтера.
Описание: вызов метода приводит примерно к тому же эффекту, что и команда меню «Пуск»-«Поиск»-«Принтеры. » («Start»-«Search»-«For Printers. «) в Windows 2000.
Пример (Windows 2000 Server):
3.13. Help
Назначение: вызов справки Windows. Возвращаемого значения нет.
Описание: вызов метода приводит к тому же эффекту, что и команда меню «Пуск»-«Справка и поддержка» («Start»-«Help and Support»).
3.14. ShutdownWindows
Назначение: вызов окна выключения и перезагрузки компьютера. Возвращаемого значения нет.
Описание: вызов метода приводит к тому же эффекту, что и команда меню «Пуск»-«Завершение работы» («Start»-«Shut Down»).
3.15. SetTime
Назначение: вызов окна настройки времени и даты. Возвращаемого значения нет.
Описание: вызов метода приводит к тому же эффекту, что и двойной щелчок по часам в правой части панели задач Windows.
3.16. TrayProperties
Назначение: вызов окна свойств панели задач Windows. Возвращаемого значения нет.
Описание: вызов метода приводит к тому же эффекту, что и команда «Свойства» («Properties») контекстного меню панели задач Windows.
3.17. ControlPanelItem
Назначение: вызов конкретного приложения панели управления. Возвращаемого значения нет.
- — имя файла конкретного приложения панели управления. Тип — строка. Пустая строка вызывает саму панель управления.
Описание: все файлы приложений панели управления имеют расширение .cpl. Некоторые приложения панели управления:
- access.cpl — специальные возможности.
- appwiz.cpl — установка и удаление программ.
- desk.cpl — настройка экрана.
- hdwwiz.cpl — мастер установки оборудования.
- inetcpl.cpl — свойства обозревателя.
- intl.cpl — язык и региональные стандарты.
- joy.cpl — игровые устройства.
- main.cpl — мышь.
- mmsys.cpl — звуки и аудиоустройства.
- ncpa.cpl — сетевые подключения.
- nusrmgr.cpl — учётные записи пользователей.
- odbccp32.cpl — настройка источников данных ODBC.
- powercfg.cpl — управление электропитанием.
- sysdm.cpl — свойства системы.
- telephon.cpl — телефон и модем.
- timedate.cpl — настройки времени и даты.
3.18. BrowseForFolder
Назначение: вызов модального окна «Выбор папки». Возвращает объект «Folder».
- — дескриптор родительского окна. Тип — целое число. 0 — текущее окно.
- — пояснение для пользователя в окне «Выбор папки». Тип — строка.
- — целое число (комбинация битовых флагов). Например, флаг 512 — запретить кнопку «Создать папку», 1 — не отображать Корзину, 16 — отображать EditBox для ввода полного пути с клавиатуры и т.п. Подробнее — см. MSDN.
- — необязательный параметр. Корневая папка в окне «Выбор папки». Тип — строка. Пользователь не сможет пройти в окне «Выбор папки» выше этой папки. Если параметр не указан, корневой папкой будет рабочий стол Windows.
3.19. Windows
Назначение: получение объекта «ShellWindows». Возвращает объект «ShellWindows».
3.20. CanStartStopService
Назначение: определяет, может ли текущий пользователь запустить/остановить указанный сервис. Возвращаемое значение — булево (число).
3.21. IsServiceRunning
Назначение: определяет, запущен ли указанный сервис. Возвращаемое значение — булево (число).
3.22. ServiceStart
Назначение: запускает указанный сервис. Возвращаемое значение — булево (число) — определяет, успешно ли завершена операция.
— строка, имя сервиса.
— булево (число). Определяет, что сервис должен автоматически стартовать при старте системы. Если указана ложь, конфигурация сервиса не меняется.
3.23. ServiceStop
Назначение: останавливает указанный сервис. Возвращаемое значение — булево (число) — определяет, успешно ли завершена операция.
— строка, имя сервиса.
— булево (число). Определяет, что сервис должен автоматически стартовать при старте системы. Если указана ложь, конфигурация сервиса не меняется.
3.24. GetSystemInformation
Назначение: возвращает некоторую системную информацию (возвращаемое значение — число).
- — строка, определяет тип информации.
Описание: подробнее — см. MSDN.
3.25. IsRestricted
Назначение: возвращает значение заданного ограничения по данным реестра (возвращаемое значение — число).
- — строка, наименование группы (ключа) в HKEY_LOCAL_MACHINE \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ policies.
- — строка, наименование параметра в указанной группе реестра, значение которого надо вернуть.
Описание: если параметр не найден в реестре, возвращается 0. Подробнее — см. MSDN.
3.26. ShellExecute
Назначение: выполняет указанное действие над указанным файлом. Возвращаемого значения нет.
3.27. ShowBrowserBar
Назначение: открывает или закрывает указанную панель обозревателя. Возвращает true в случае успеха, и false в случае неудачи.
- — строка. Идентификатор класса (CLSID) панели обозревателя. Некоторые возможные значения:
- Favorites —
- Folders —
- History —
- Search —
- — булево. True — показать, false — спрятать панель.
Описание: метод доступен только в контексте HTML-документа.
3.28. AddToRecent
Назначение: помещает ярлык на указанный файл в папку «Недавних документов» («Recent») текущего пользователя. Возвращаемого значения нет.
- — строка. Путь к файлу.
- — строка (необязательный). Имя категории, в которую помещается файл.
3.29. ExplorerPolicy
Назначение: возвращает значение указанной Internet Explorer policy.
— строка. Имя Internet Explorer policy.
Описание: WindowsXP и выше.
3.30. GetSetting
Назначение: возвращает значение указанной глобальной установки (параметра) проводника.
- — целое число (набор флагов), определяющее глобальную установку (параметр) проводника. Некоторые возможные значения (подробнее — см. MSDN):
- 1 — Показывать скрытые файлы и папки.
- 2 — Скрывать расширения для зарегистрированных типов файлов.
3.31. ToggleDesktop
Назначение: сворачивает или разворачивает все окна на рабочем столе. Возвращаемого значения нет.
Описание: имитирует нажатие на значок «Свернуть все окна» в панели «Быстрый запуск» («Quick launch»).
3.32. WindowsSecurity
Назначение: имитирует нажатие CTRL+ALT+DELETE при использовании соединения Microsoft Terminal Server. Возвращаемого значения нет.
Описание: WindowsXP и выше.
4. Объект Folder
4.1. Создание объекта
Объект виртуальной папки проводника.
4.2. Свойства
4.2.1. Title
Возвращаемое значение: строка — заголовок папки с соблюдением регистра букв. Конструкция:
выведет строку «WINDOWS».
выведет строку «Локальный диск (C:)».
Замечание: только чтение.
4.2.2. Self
Возвращаемое значение: объект FolderItem, соответствующий текущей папке. Аналогично вызову «.Items().Item()».
Замечание: только чтение.
4.2.3. ParentFolder
Возвращаемое значение: объект «Folder» родительской папки.
Замечание: только чтение.
4.2.4. Application
Возвращаемое значение: объект «IShellDispatch».
Замечание: только чтение.
4.2.5. OfflineStatus
Возвращаемое значение: Offline status текущей папки. Тип — целое число.
Замечание: только чтение.
4.3. Методы
4.3.1. NewFolder
Назначение: создание новой папки внутри текущей. Возвращаемого значения нет.
- — имя создаваемой папки. Тип — строка.
- — необязательный. В настоящее время не используется.
4.3.2. CopyHere
Назначение: копирование файла или папки вовнутрь текущей папки. Возвращаемого значения нет.
- — полный путь к копируемому файлу или папке (строка) или объект FolderItem.
- — необязательный. Опции копирования — число (комбинация битовых флагов). Некоторые флаги (подробнее см. MSDN):
- 4 — Не показывать окно с прогресс-баром.
- 8 — Дать копируемому файлу новое имя, если файл с таким именем уже существует.
- 16 — Отвечать автоматически «Yes to All» в любом отображаемом диалоге.
- 256 — Отображать окно с прогресс-баром, но не показывать имена файлов.
- 4096 — Производить операции только в локальной папке. Не производить операции рекурсивно в подпапках.
- 9182 — Не копировать связанные файлы (например, html-файлы с их папками) как группу. Копировать только указанные файлы.
Описание: копируемый файл или папка может находиться внутри текущей папки. Вызов метода приводит к тому же эффекту, что и перетаскивание файлов в проводнике.
4.3.3. MoveHere
Назначение: перенос файла или папки вовнутрь текущей папки. Возвращаемого значения нет.
Параметры: полностью аналогично методу «CopyHere». См. описание метода «CopyHere».
Описание: полностью аналогично методу «CopyHere». См. описание метода «CopyHere».
4.3.4. Items
Назначение: получение объекта FolderItems. Возвращает объект FolderItems.
4.3.5. ParseName
Назначение: получение объекта FolderItem, соответствующего элементу текущей папки. Возвращает объект FolderItem.
- — Имя получаемого элемента папки. Тип — строка.
4.3.6. GetDetailsOf
Назначение: получение информации об элементе текущей папки. Возвращает строку.
- — объект FolderItem, соответствующий элементу текущей папки.
- — целое число, определяющее тип информации. Возможные значения:
- 0 — Имя элемента.
- 1 — Размер элемента (только для файлов).
- 2 — Тип элемента.
- 3 — Дата и время последней модификации.
- 4 — Дата и время создания.
- -1 — Тип элемента, дата и время последней модификации и размер элемента (только для файлов).
Описание: возвращается информация, похожая на ту, что можно увидеть в окне свойств файла (папки) в проводнике.
4.3.7. DismissedWebViewBarricade
Назначение: см. MSDN. Возвращаемого значения нет.
4.3.8. Synchronize
Назначение: синхронизирует все offline-файлы. Возвращаемого значения нет.
5. Объект FolderItems
5.1. Создание объекта
5.2. Свойства
5.2.1. Application
Возвращаемое значение: объект «IShellDispatch».
Замечание: только чтение.
Пример (Windows XP):
5.2.2. Count
Возвращаемое значение: число. Количество элементов коллекции — элементов папки.
Замечание: только чтение.
5.2.3. Verbs
Возвращаемое значение: объект FolderItemVerbs. Коллекция действий («глаголов»), относящихся ко всем элементам папки.
Замечание: только чтение.
5.3. Методы
5.3.1. Item
Назначение: получение объекта FolderItem. Возвращает объект FolderItem.
- — необязательный. Индекс в коллекции элементов папки (отсчёт — с нуля). Если параметр опущен, возвращает объект FolderItem, соответствующий самой папке.
5.3.2. InvokeVerbEx
Назначение: выполнить действие операционной системы («глагол») над всеми элементами папки (не рекурсивно). Возвращаемого значения нет.
- — необязательный. Строка — наименование действия, которое нужно выполнить. Если не указан, выполняется действие по умолчанию.
- — необязательный. Строка — аргументы действия, указанного в первом параметре.
5.3.3. Filter
Назначение: устанавливает для элементов папки фильтр с использованием групповых символов. Возвращаемого значения нет.
- — набор флагов фильтрации. Некоторые значения (подробнее — см. MSDN):
- 32 — учитывать папки.
- 64 — учитывать не папки.
- 128 — учитывать скрытые элементы.
- — строка фильтра.