본문 바로가기

C/C++

[inno setup] 설치시 사용자 대화창 없애기

[inno setup] 설치시 사용자 대화창 없애기

 

 

inno setup 으로 설치 파일을 만들 때 사용자 대화창 (설치 경로/비밀번호 등)을 없애고 싶을 때가 있습니다.

사용자가 클릭 한번으로 설치할 수 있도록.

 

번째 방법은

command-line에서 파라미터로 /silent 혹은 /verysilent 혹은 /sp- 를 사용하여 '조용히' 설치할 수 있습니다.

아래 처럼요.

> setup.exe /silent

이렇게 하면 setup.exe를 더블클릭했을 경우 확인 창도 뜨지 않고 바로 설치에 들어갑니다.

아래에서 보듯이 /verysilent 는 '매우 조용히' 설치 할 수 있네요. 설치 창이 전혀 보이지 않습니다.

 

/SP-
Disables the This will install... Do you wish to continue? prompt at the beginning of Setup. Of course, this will have no effect if the DisableStartupPrompt [Setup] section directive was set to yes.

 

/SILENT, /VERYSILENT
Instructs Setup to be silent or very silent. When Setup is silent the wizard and the background window are not displayed but the installation progress window is. When a setup is very silent this installation progress window is not displayed. Everything else is normal so for example error messages during installation are displayed and the startup prompt is (if you haven't disabled it with DisableStartupPrompt or the '/SP-' command line option explained above).

If a restart is necessary and the '/NORESTART' command isn't used (see below) and Setup is silent, it will display a Reboot now? message box. If it's very silent it will reboot without asking.

 

문제는, setup.exe 외부에서 실행하면서 파라미터로 주어야 합니다.

위처럼 커맨드 라인에서 할 수도 있고, 바로가기 아이콘을 만들어서 '속성'에서 '바로 가기'탭에 '대상'에 파라미터를 줄 수도 있습니다.

어찌됐든 setup.exe가 필요하고 스크립트 또는 다른 실행 파일이 '또' 필요합니다.

 

이 방법은 대화창이 전혀 없이 외부에서 실행 할 경우에 사용할 수 있겟네요

 

 

리고, 다른 방법.

 

inno setup 홈페이지의 FAQ 에 보면 다음과 같은 글이 있습니다.

Is it possible to do a silent install without using the /SILENT or /VERYSILENT command-line parameters?

 

No, nor is such a feature planned (it would be abused). If it is your intention to keep user interaction to a minimum, use the Disable* [Setup] section directives. 

'커맨드 라인에서 /silent 혹은 /verysilent를 하지 않고 조용한 설치를 할수 있을까'에 대한 답은...

없다. 그러나 [Setup] 섹션 명령어에서 가능한 모든 옵션을 Disable 해서 최소화 할 수 있다...  입니다.

아래와 같이 말이죠

 

[Setup]

 

;사용자 대화창 비활성화

DisableStartupPrompt=true

DisableFinishedPage=true

DisableReadyMemo=true

DisableReadyPage=true

DisableWelcomePage=yes

DisableDirPage=yes

DisableProgramGroupPage=yes

 

이렇게 하면, 스크립트 내에서 해결할 수 있고,

최초 확인창이 나타나고 클릭한번만 하면 됩니다. ok..

 

 

자세한 내용은 홈페이지dml 'Document'에서  'Wizard Pages'를 찾아보시면 됩니다.

http://www.jrsoftware.org/ishelp/

링크 귀찮으시면 아래 참고

Wizard Pages

Below is a list of all the wizard pages Setup may potentially display, and the conditions under which they are displayed.

·         Welcome
Shown by default, but can be disabled via DisableWelcomePage.

·         License Agreement
Shown if LicenseFile is set. Users may proceed to the next page only if the option "I accept the agreement" is selected.

·         Password
Shown if Password is set. Users may proceed to the next page only after entering the correct password.

·         Information
Shown if InfoBeforeFile is set.

·         User Information
Shown if UserInfoPage is set to 
yes.

·         Select Destination Location
Shown by default, but can be disabled via DisableDirPage.

·         Select Components
Shown if there are any [Components] entries.

·         Select Start Menu Folder
Shown if there are any [Icons] entries, but can be disabled via DisableProgramGroupPage.

·         Select Tasks
Shown if there are any [Tasks] entries, unless the [Tasks] entries are all tied to components that were not selected on the Select Components page.

·         Ready to Install
Shown by default, but can be disabled via DisableReadyPage.

·         Preparing to Install
Normally, Setup will never stop on this page. The only time it will is if Setup determines it can't continue. This can happen if the 
PrepareToInstall event function returned an error or if one or more files specified in the [Files] section were queued (by some other installation) to be replaced or deleted on the next restart. In this case, it tells the user they need to restart their computer and then run Setup again. Note that this check is performed on silent installations too, but any messages are displayed in a message box instead of inside a wizard page.

·         Installing
Shown during the actual installation process.

·         Information
Shown if InfoAfterFile is set.

·         Setup Completed
Shown by default, but can be disabled in some cases via DisableFinishedPage.

 

 

 

참고

1. http://www.jrsoftware.org/