Inno Setup - проверка на факт запуска
От: Norfolc Тренажеры интуиции
Дата: 26.04.09 20:52
Оценка: 12 (1)
#Имя: FAQ.tools.innosetup.1
Здравствуйте, leonidus1981, Вы писали:

L>Подскажите пожалуйста как в IS сделать проверку перед началом деинсталяции на факт запуска программы и если программа запущена обязать пользователя выйти из программу перед деинсталяцией?

Всё достаточно просто. Нужно в скрипт включить вот это:
[Setup]
AppMutex=MyProgramsMutexName


This directive is used to prevent the user from installing new versions of an application while the application is still running, and to prevent the user from uninstalling a running application. It specifies the names of one or more named mutexes (multiple mutexes are separated by commas), which Setup and Uninstall will check for at startup. If any exist, Setup/Uninstall will display the message: "[Setup or Uninstall] has detected that [AppName] is currently running. Please close all instances of it now, then click OK to continue, or Cancel to exit." The value may include constants.


Ну и в код включить создание соответствуюещго мутекса. В справке к инно всё написано.

27.04.09 08:18: Перенесено модератором из 'Shareware и бизнес' — Odi$$ey
inno setup
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.