?
Solved

Inno Setup Questions

Posted on 2010-08-31
2
Medium Priority
?
1,113 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 1000 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
This article was originally published on Monitis Blog, you can check it here . If you have responsibility for software in production, I bet you’d like to know more about it. I don’t mean that you’d like an extra peek into the bowels of the sourc…
This video will demonstrate how to find the puppet warp tool from the edit menu and where to put the points to edit.
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

801 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