Solved

Inno Setup Questions

Posted on 2010-08-31
2
1,108 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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Today companies are subjected to more-and-more data, and it won't stop any time soon.  But there are obvious opportunities for reducing data, particularly data duplicated among companies.
This guide will walk you through the essential considerations and tech stack for building scalable websites. Know how to grow your business the smart way!
The viewer will learn how to set up a document for the web and print and the recommended PPI for printing.
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

895 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

14 Experts available now in Live!

Get 1:1 Help Now