Solved

Inno setup help

Posted on 2008-06-15
1
704 Views
Last Modified: 2008-06-16
Using Inno Setup, is there a way to accept multiple passwords.  I tried this line, but it does not work:

Password=60604; password

0
Comment
Question by:al4629740
1 Comment
 
LVL 18

Accepted Solution

by:
mirtheil earned 500 total points
Comment Utility
Instead of the "Password" directive, you'll need to use the CheckPassword function. Here's an example:
; Script generated by the Inno Setup Script Wizard.

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
 

#define MyAppName "My Program"

#define MyAppVerName "My Program 1.5"

#define MyAppPublisher "My Company, Inc."

#define MyAppURL "http://www.example.com/"

#define MyAppExeName "MyProg.exe"
 

[Setup]

; NOTE: The value of AppId uniquely identifies this application.

; Do not use the same AppId value in installers for other applications.

; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)

AppId={{EF498E93-AED1-419D-A98E-C5CDB934C44D}

AppName={#MyAppName}

AppVerName={#MyAppVerName}

AppPublisher={#MyAppPublisher}

AppPublisherURL={#MyAppURL}

AppSupportURL={#MyAppURL}

AppUpdatesURL={#MyAppURL}

DefaultDirName={pf}\{#MyAppName}

DefaultGroupName={#MyAppName}

OutputBaseFilename=setup

Compression=lzma

SolidCompression=yes

;Password=60604; password
 

[Languages]

Name: "english"; MessagesFile: "compiler:Default.isl"
 

[Tasks]

Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
 

[Files]

Source: "C:\util\innosetup\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion

; NOTE: Don't use "Flags: ignoreversion" on any shared system files
 

[Icons]

Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"

Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
 

[Run]

Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#MyAppName}}"; Flags: nowait postinstall skipifsilent
 

[code]

function CheckPassword(Password: String): Boolean;

begin

 result := false;

 if (Password='60604') or (Password='password') then

   result := true;

end;

 

Open in new window

0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

One of the major drawbacks of deploying applications by GPO is the complete lack of any centralized reporting. After a normal deployment, there are two ways to find out if it was successful – by looking in the event log, and by looking in the log of…
If you don't know how to downgrade, my instructions below should be helpful.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now