We help IT Professionals succeed at work.

Configuration of Inno Setup

fatihbarut
fatihbarut asked
on
1,161 Views
Last Modified: 2012-06-21
Hi guys,
I am trying to do that

I have file1 and file2 and install that like this

C:/Myfolder/file1

User prompt to ask where to install and get result as "user defined folder" then

User defined path/My Folder/file2

could you help me please,

Not: Another problem. I don't want user account settings block my program. Is there anyway to register my program.exe as trustful asking or without asking user while setup?
Comment
Watch Question

Marco GasiFreelancer
CERTIFIED EXPERT
Top Expert 2010

Commented:
I'm not sure to understand your question, so I try to explain something about InnoSetup: if I'm wrong, correct me, please.

Firt I suggest you to use InnoIDE: http://www.innoide.org/download.php Just download, install and run.
In InnoIDE, you add files in Files and Folder tab. Here you double click on a file and a window shows up. Here you can select destination folder. Usually if you choose {app} from DestDir->Directory constants you should get what you want.

Cheers

Author

Commented:
thanks
I was using innohelper. This is obviosly better one and ofcourse at least 100p answer.
however I still need help.

The question is how can I let the user change the installation path. Actually they must change it. It must be obligation.
Freelancer
CERTIFIED EXPERT
Top Expert 2010
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
it was really good explanation

Author

Commented:
there is a problem.
I dont want to create directory, I want to use existing one
Marco GasiFreelancer
CERTIFIED EXPERT
Top Expert 2010

Commented:
It seems that is not possible: if you set CreateAppDir to false, InnoSetup simply skip select dir page. Let me do some investigation about this, please...

Author

Commented:
thanks, I also noticed that...
Marco GasiFreelancer
CERTIFIED EXPERT
Top Expert 2010

Commented:
Try to modify code this way

function NextButtonClick(CurPageID: Integer): Boolean;
var
  ResultCode: Integer;
begin
  if CurPageID = wpSelectDir then
  begin
    if WizardDirValue = GetProgramFolder + '\temp' then
    begin
      MsgBox('Please, change the default destination folder first.', mbInformation, MB_OK);
      Result := False;
    end
    else if not DirExists(WizardDirValue) then
    begin
      MsgBox('Please, choose an existent folder.', mbInformation, MB_OK);
      Result := False;
    end
    else
      Result := True;
  end
  else
    Result := True;
end;

Cheers
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.