Solved

Inno Setup Questions

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

The Eight Noble Truths of Backup and Recovery

How can IT departments tackle the challenges of a Big Data world? This white paper provides a roadmap to success and helps companies ensure that all their data is safe and secure, no matter if it resides on-premise with physical or virtual machines or in the cloud.

Question has a verified solution.

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

I use more than 1 computer in my office for various reasons. Multiple keyboards and mice take up more than just extra space, they make working a little more complicated. Using one mouse and keyboard for all of my computers makes life easier. This co…
If your app took Google’s lash recently, here are the 5 most likely reasons.
Video by: Tony
This video teaches viewers how to export a project from Adobe Premiere Pro and the various file types involved.
XMind Plus helps organize all details/aspects of any project from large to small in an orderly and concise manner. If you are working on a complex project, use this micro tutorial to show you how to make a basic flow chart. The software is free when…

772 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