Question on INNO

Posted on 2007-10-12
Medium Priority
Last Modified: 2010-04-16
Hello group,

I'm using INNO 5.1.9 and when user runs the setup and gets to "Select Destinatin Location" where
a path could be entered the setup ignores what user has entered so it goes with the default one
which is /program file/myapplicationdir. It only creates the new path but still the application files go to the default path which is shows during setup procedure.

How can I make this flexible and more user friendly?

Question by:akohan
LVL 101

Expert Comment

ID: 20068424
I haven't used INNO but there should be an option when building the setup file to either not prompt for the location or to use the user location.

LVL 28

Expert Comment

ID: 20068900
you must use correct paths in your inno script.

the files section should look like this:
Source: "filename"; DestDir: "{app}";
see that {app} there? that means the destination directory and will be expanded by the installer to whatever the user selects.

Author Comment

ID: 20069771

This is my code:

Source: "C:\MyApp\test.dll"; DestDir: "{pf}\MyApp\"; Flags: regserver

since I want to put it under Program File. Any thing worng with it?

LVL 18

Accepted Solution

Johnjces earned 1000 total points
ID: 20069981

Your [Files} section should look something like:

Source: "C:\DelphiWork\EasyPhotoView\EPhotoView.exe"; DestDir: "{app}"; Flags: ignoreversion

In the setup section you should have a default install directory which by default will be c:\Program Files. That should look something like:

DefaultDirName={pf}\JCITS Systems/Easy PhotoView

Do not use the {pf} in your [Files] section.

Let us know if this worked. This way Inno knows what the default directory is and then should allow a user to change it as you mentioned in your post.

LVL 28

Assisted Solution

2266180 earned 1000 total points
ID: 20070335
I didn't get to reply last night as EE went into maintenance.

you initially said that you want the user to have a chance to put it where they want.
now you say you want it under program files.
you want the user to choose but you are restricting him.

- use the {app} as I suggested
- set the DefaultDirName to {pf}\MyApp\
- in the code section add

function NextButtonClick(CurPageID:integer):boolean;
  if curPageId=wpSelectDir then
    result:=pos(ExpandConstant('{pf}'), ExpandConstant('{app}'))>0
  if not result then
    msgbox('you must choose a folder within '+ExpandConstant('{pf}'), mbInformation, mb_ok);

(not tested but looks like it does the job, if I undesrtood correctly what you want)

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
When you see single cell contains number and text, and you have to get any date out of it seems like cracking our heads.
This Micro Tutorial demonstrate the bugs in Microsoft Excel for Mac with Pivot Charts.
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

850 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