?
Solved

Question on INNO

Posted on 2007-10-12
5
Medium Priority
?
325 Views
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?

Regards,
Amit
0
Comment
Question by:akohan
5 Comments
 
LVL 101

Expert Comment

by:mlmcc
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.

mlmcc
0
 
LVL 28

Expert Comment

by:2266180
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.
0
 

Author Comment

by:akohan
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?

Thanks,
ak
0
 
LVL 18

Accepted Solution

by:
Johnjces earned 1000 total points
ID: 20069981
Hi!

Your [Files} section should look something like:

[Files]
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.

John
0
 
LVL 28

Assisted Solution

by:2266180
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.

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

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

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

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