Показать сообщение отдельно
Старый 19.09.2011, 10:24   #22  
Alterant is offline
Alterant
Участник
 
378 / 10 (1) +
Регистрация: 31.03.2004
Цитата:
Сообщение от InTacto Посмотреть сообщение
Цитата:
Сообщение от Alterant Посмотреть сообщение
Можно и так, но нужно учитывать, что SHELL начиная с 4-ой версии запрашивает подтверждение и под NASом работать не будет. Чтобы не запрашивала нужно 'c:\list.bat' объявить как текстовую константу, но тогда мы жестко привязаны к имени файла.
Эту константу выводим в настройки и пишем что хотим. За одном в настройках нужно сохранить этот замечательный файл, чтобы, при его отсутствии у конечного пользователя, он выгрузился в нужно нам место (не забудем путь вынести тоже в настройки). Или можно, конечно, не забыть его просто туда положить. <- Это для тех кто не захотел заморачиваться с внешними компонентами или табличкой файл.
А как вы константы в настройки выводите? Поля и переменные раньше не прокатывали - все равно спрашивает подтверждение, или сейчас уже работают?
Справка говорит о том, что только константы работают без подтверждения:

Цитата:
The SHELL function has been designed so that each user can create a list of trusted executables. This list is maintained in the user’s .zup file. The way this function works depends on whether the executable is given as a text constant or as a variable.
If the name of the executable is passed to the SHELL function as a text constant then the executable is trusted and the user is not prompted to confirm that they trust the executable. This is also the case when the executable (text constant) is called with a number of other arguments that have been assigned manually.
If the name of the executable is passed to the SHELL function as a variable then the executable is not trusted and the user is prompted to confirm whether they trust the executable the first time it is called. After the user has confirmed that they trust the executable it can be called again at any time without having to confirm that it is trusted.