Solved

Inno Setup Questions

Posted on 2010-08-31
2
1,112 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

Question has a verified solution.

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

Skype is a P2P (Peer to Peer) instant messaging and VOIP (Voice over IP) service – as well as a whole lot more.
Invest in your employees with these five simple steps to improve employee engagement and retention.
This video demonstrates how to use each tool, their shortcuts, where and when to use them, and how to use the keyboard to improve workflow.
Viewers will learn how to use the Hootsuite Dashboard.

724 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