Solved

Inno Setup Questions

Posted on 2010-08-31
2
1,106 Views
Last Modified: 2013-12-12
I have 3 questions about InnoSetup.

1). My script has a  password set   eg:

[Setup]
Password =   pass

I'd like the password to be conditional so that if a file or folder exists, don't ask for a password ( as it's an upgrade) else  it's a new installation do ask for the password phrase.



2).  Desktop icons
 
I want to ask the user if the icons should be visible to all users or the current user.  What should be written in the Icons section?

[Tasks]
; Following tasks will tell Inno to create an aditional form asking user for aditional details
Name: icons;        Description: "Create a &desktop icon";    GroupDescription: "Additional icons:";
Name: icons\common; Description: "For all users";             GroupDescription: "Additional icons:"; Flags: exclusive
Name: icons\user;   Description: "For the current user only"; GroupDescription: "Additional icons:"; Flags: exclusive unchecked


3). I need to copy a file  from the windows folder  to {app}
Is there any way to check for success or how best to do this?


Thanks


0
Comment
Question by:SarusSystems
2 Comments
 
LVL 29

Accepted Solution

by:
matrixnz earned 250 total points
ID: 33604071
A1. This could make it easy to by-pass your password altogeather, what you could do is create 2 seperate installers: Setup.exe and Upgrade.exe then place both of these into a third installer.  You can then use code to check for an existance of previous version/versions and if true run Upgrade.exe otherwise run Setup.exe which will then prompt for the password.  Otherwise you could use the CheckPassword function see Inno Setup Help for more information.

A2.
[Icons]
Name: "{userdesktop}\Icon Name"; Filename: "{app}\FileName.exe"; Tasks: icons/user
Name: "{commondesktop}\Icon Name"; Filename: "{app}\FileName.exe"; Tasks: icons/common

A3. If the file is already in the Windows Folder, I'm not sure why you would want to copy it to app, since the Windows Directory is a system path so you should be able to call that file from any program for example, if you open start run and type calc it will open calculator, otherwise you would use something like.
[Files]
Source: {win}\explorer.exe; DestDir: {app}; Flags: external

Cheers
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Storage devices are generally used to save the data or sometime transfer the data from one computer system to another system. However, sometimes user accidentally erased their important data from the Storage devices. Users have to know how data reco…
Healthcare organizations in the United States must adhere to the guidance of both the HIPAA (Health Insurance Portability and Accountability Act) and HITECH (Health Information Technology for Economic and Clinical Health Act) for securing and protec…
The viewer will learn how to create multiple layers to apply various filters and how to delete areas from each layer’s filter.
The viewer will learn how to successfully download and install the SARDU utility on Windows 8, without downloading adware.

707 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

18 Experts available now in Live!

Get 1:1 Help Now