• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 611
  • Last Modified:

Scritping for InnoSetup

I need help with a script for setting the following in the latest version of innosetup. I will like to define the following in the script.

The InnoSetup can be found at this link: http://www.jrsoftware.org/isdl.php

BackEnd Script:

(a). Set installation directory as C:\Develoment for all operating systems
       ..the following mdb files:
     (i).   Sample_Be.mdb
      (ii).  Update.mdb

(b). First determine the operating system -- whether it's Windows 98, WinNt, Win2K
      Server 2003, then
     ...Direct script to install the following in C:\Windows\system (Win98) or
      C:\Windows\Systems32...(for all operating system using system32)
        (i).   comctl32.ocx
        (ii).   mscomctl.ocx
        (iv).   msadox.dll
         (v).   mousewheel.dll


(c). Direct the script to copy the following files into c:\Development
             example1.xlt
             example2.xlt
             example3.xlt

I will appreciate any help on this request.
0
billcute
Asked:
billcute
  • 16
  • 5
  • 4
  • +2
2 Solutions
 
thenelsonCommented:
This might help you:
http://isx.wintax.nl/
0
 
billcuteAuthor Commented:
thenelson,
I am already aware of the link you provided..deosnt seems to resolve my concern -- the reason of this EE post.

Regards
Bill
0
 
flavoCommented:
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Bill,

  Unless we have an Expert that's already used this installer, the best source of info seems to be the web site itself.  In answer to part B of your question, I found this:

"Installing Different Files Depending on Windows Version
That can be done via MinVersion and/or OnlyBelowVersion parameters on an entry. See the Common Parameters topic in the documentation for details.

Here is a simple example of how to install one file on NT platforms (Windows NT/2000/XP/2003) and another file on non-NT platforms (Windows 95/98/Me):

[Files]
Source: "{app}\WinNT2000XP.exe"; DestDir: "{app}"; MinVersion: 0, 1
Source: "{app}\Win9598Me.exe"; DestDir: "{app}"; MinVersion: 1, 0

"0" means never install; "1" means install on any version (i.e. version 1.0 or later).

Note: The above technique isn't limited to the [Files] section; MinVersion and OnlyBelowVersion can be used in most sections.
"

  I also looked through the section for Visual Basic and found an example setup script that covers most of your points.  Last, it also seems the product has it's own newsgroup.  As your question is really about the installer and not about Access specifically, you may find quicker answers there.

Jim D
0
 
billcuteAuthor Commented:
flavo
Thanks for the info, Jim's seems to answer some of my questions.

Regards
Bill
0
 
billcuteAuthor Commented:
Jim,
Thanks for your input. Any idea of how to specify specific directory to install?

Regards
Bill
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Bill,

  From sample script Example1, looks like you specify it in the setup section of the script using the DefaultDirName:

[Setup]
AppName=My Program
AppVerName=My Program version 1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
UninstallDisplayIcon={app}\MyProg.exe
Compression=lzma
SolidCompression=yes

  From there on, you reference that dir with {app}.  Checking the docs, it also looks like you need to set DisableDirPage to Yes, so the user can't change the directory location.  

Jim D
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Bill,

  Hey, BTW, thanks for bringing to light what looks like a promising product.  One of the big grumbles over the years with Access has always been the installer.   And Wise/Sage are expensive.

  Might take a while though to get it all right.

Jim D
0
 
billcuteAuthor Commented:
Thanks Jim,
Got the idea. I'll check the site for further info.

Regards
Bill
0
 
dloendorfCommented:
Have you looked at this front-end for innosetup.
I use it very successfully.
http://www.istool.org/default.aspx/
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Bill,

  If you need more help holler.  I got the product installed.

Jim D
0
 
billcuteAuthor Commented:
Ok Jim,
I am happy you've installed the program. Looking at my original question, please prepare a script that will install my sample steps (with specific file names and directory...including (ocx and dll files) as specified in the question.

Regards
Bill
0
 
billcuteAuthor Commented:
Jim,
I am sure that you will agree with me to keep this topic alive by re-opening it so that all experts would be given equal opportunity moreso that there is a new contribution to the post which is worth consideration.

Regards
Bill
0
 
billcuteAuthor Commented:
dloendorf
I have just opened the site you referred but have not downloaded the tool. I will check it out and give you a feedback.

Question:
In what way will "ISTOOL" resolve the questions on my post?

Regards
Bill
0
 
dloendorfCommented:
Bill,

ISTOOL gives you a nice GUI drag and drop interface to build the scripts that innosetup will then compile. You do the compile from ISTOOL. When you are finished dragging and dropping, you can look at the script that was generated for innosetup. ISTOOL easily allows you to define components and tasks. Using ISTOOL I was able to setup a complete install package in a couple of hours, knowing nothing about either innosetup or istool. It took a while longer to add my own pascal scripting but even that was not difficult.

David
0
 
dloendorfCommented:
Jim,
Are you saying my response is unaccepted? If so why?

Thanks - David
0
 
billcuteAuthor Commented:
dloendorf ,
I asked that the CS re-open this post after you made a contribution worthy of consideration along with others.

I am sure that experts here will agree with me as well.
Regards
Bill
0
 
billcuteAuthor Commented:
dloendorf,
I tried the ISTool and I was able to create a "Script". However, I need to clear some questions that cam up in my mind when creating a script using IsTool.
(1). Is there a way to specify that InnoSetup must "register" some dlls and ocx files
      during program installaton of InnoSetUp of lats say Access db?
     In other words question item (b) of my post question was not clear nor specified
     when creating script using ISTool.
    Here is that question brought forward........
   
 ......First determine the operating system -- whether it's Windows 98, WinNt,
      Win2K, Server 2003, then
     ...Direct script to install the following in C:\Windows\system (Win98) or
      C:\Windows\Systems32...(for all operating system using system32)
        (i).   comctl32.ocx
        (ii).   mscomctl.ocx
        (iv).   msadox.dll
         (v).   mousewheel.dll

(2). After a script has been created using IsTool, how do I now use this script with
      the InnoSetUp wizard ?

Regards
Bill
0
 
billcuteAuthor Commented:
JDettman,
Now that you have installed and tested INNOSETUP, would you mind explaining part B of my question as stated in my last post dated 04/12/2006 11:14AM EDT.

Regards
Bill
0
 
dloendorfCommented:
Part B can be accomplished in the following manner.

Add the following function to the code section in ISTOOL

function GetData(Param: String): String;
begin
  { Return a data value }
  if Param = 'WindowsDir' then
    Result := GetSystemDir
end;

Then select the Script section and look for the script lines that you will modify as follows:

FROM: Source: ...\mousewheel.dll; DestDir: C:\WINDOWS\system32\mousewheel.dll

TO:      Source: ...\mousewheel.dll; DestDir: {code:GetData|WindowsDir}\mousewheel.dll

At execution time of the installer {code:GetData|WindowsDir} will be replaced by the path to the system directory on whcih ever OS it is being installed on.

David
0
 
billcuteAuthor Commented:
David,
Thanks for responding....
Why the "From: Source:......To: Source:.....\ etc

It's very confusing.

Asuming that my source (where the dlls and ctx are stored) is:
 E:\DLLFiles for instance and my Destination directory is C:\Windows\system32\
then what should your suggested code be based on your explanation above. ???
' *****************
FROM: Source: ...\mousewheel.dll; DestDir: C:\WINDOWS\system32\mousewheel.dll

TO:      Source: ...\mousewheel.dll; DestDir: {code:GetData|WindowsDir}\mousewheel.dll
0
 
billcuteAuthor Commented:
David,
I dont know if I came across in my question above. I just wanted to know why we had:

From Source:......

To:   Source

Assuming that I have all the DLLs and OCXs in a directory called E:DllFiles and wanted theses
files registed in say for example:

C:\Windows\System ------ for Windows98 Users

...and

C:\Windows\System32 ------ for WindowsXp Users

Further assistance will be appreciated.

Regards
Bill
0
 
Jim Dettman (Microsoft MVP/ EE MVE)PresidentCommented:
Bill,

<<Now that you have installed and tested INNOSETUP, would you mind explaining part B of my question as stated in my last post dated 04/12/2006 11:14AM EDT.>>

  First, you and David have been discussing the use of the ISTOOL, which I have no knowledge of.  Second, I had already had given you my answer to part B of your question in regards to INNOSETUP, which you had decided to accept as an answer before you unaccepted the question.

  Third, after un-accepting, you posted this:

<<I am happy you've installed the program. Looking at my original question, please prepare a script that will install my sample steps (with specific file names and directory...including (ocx and dll files) as specified in the question.>>

   I sorry, but it's at this point that I draw the line.  I like to help people out as much as possible and will hopefully help them and myself learn something in the process.  But out of  respect to my clients, I cannot in good conscience do something for free which I would charge them for.

   The other part of this is that with setup scripts, there is always a large amount of detail which you need to know in order to do it properly.  I know nothing of your situation and what it is exactly that your trying to accomplish.  Without direct knowledge of that, it would be very difficult to provide a compete script.  I thought I had given you enough direction so that you could continue on your own and from your responses, it seemed that was the case.

  I was willing to provide additional help in getting specific items working within your script even though you had already closed the question, but I am not willing to write the whole script for you.  Your original question to me did not seem to be about that.  If that was the case, I would not have commented at all in the first place.  EE is not meant to be a "rent a coder" service.

  I also objected very much to you re-opening the question.  The points I could care less about.  I'd be on EE if they were here or not.  It's just the principle of the thing.  You asked a question, got comments, indicated that you were moving forward, and accepted.   If you were not happy with the comments so far, you should not have accepted in the first place.

  You might want to review the following:

http://www.experts-exchange.com/help.jsp#hs3
http://www.experts-exchange.com/help.jsp#hs5

   Which has some general guide lines on asking and closing questions.

Jim D.

0
 
billcuteAuthor Commented:
Jim,
This is not about points - I am sure it's not.

I am glad you said it was a new subject to you and that you would benefit from it as well. In this case, you have downloaded the software and installed it. - so nothing lost on both sides.

Nothing wrong in asking a followup question based on your new experience with the software, therefore the issue of "rent-a-coder" does not come in at all since the item is still new to you as well.

 If I needed to rent a coder - I will probably rent an expert who very vast and knowledgeable with the subject. In this case I have chosen to use EE and your response to my question needed further explanation / clarification - the reason for my followup.  

Besides, as a matter of courtesy, I did inform you on this post before requesting CS to re-open the question about my intention to re-open this very post. You did not respond then.

So, If a question was closed prematurely, it's certainly my right within the EE guidelines to unaccept previous answer and allow equal opportunity to everyone here who made contributions - it happens here all the time and I am sure that you are used to that. It is an accepted rule and I dont expect you to grumble about it afterall you said it's not about points.

In respect to my part b question - the following was your response:

Jim wrote:
[Files]
Source: "{app}\WinNT2000XP.exe"; DestDir: "{app}"; MinVersion: 0, 1
Source: "{app}\Win9598Me.exe"; DestDir: "{app}"; MinVersion: 1, 0

Now, here i my problem - your response does not respond specifically to my question where I wanted to now how the application will install both the DLL and OCX files. Yes, I thought I could make it work by your example then closed the post prematurely. By asking the same question over agaain - it means that I have not yet received a solution to the question.

If I ask you a question and you dont feel like answering, you are free to ignore it - and I assumed this was what you have done. Other experts who have the informtion would certainly respond to the question if they have the information. - -- No sweat.

Regards
Bill
0
 
billcuteAuthor Commented:
Jim,
Additional information.

Before posting my question, I had already read the "CUSTOM INSTALLATION" and FAQ on installing OCX files at the links below...but decided to post some questions on EE because I still needed more info:

(a). http://www.jrsoftware.org/isfaq.php#ocx and,
(b). http://www.jrsoftware.org/isfaq.php#noregserver

On conditional installations, I also read FAQ at the following links:
(c). http://www.jrsoftware.org/isfaq.php#conditional

 ...and Installing Different Files Depending on Windows Version

(d). http://www.jrsoftware.org/isfaq.php#difffiles

These are the links you and I both have access to or anyone who have visited the INNOSETUP site that I referred in my post question.

I am sure these links will clarify things a little better.

Regards
Bill
0
 
billcuteAuthor Commented:
dloendorf ,
I will appreciate further information regarding the implementation of your last suggested code.

Regards
Bill
0
 
billcuteAuthor Commented:
To All,
Thanks for the assistance received on this post. I have thoroughly reviewed the contributions here and noted the following:
(1).  thenelson's original suggestion was the best. The reason being that further query to his refered site actually
       suggested the use of third party tools which I originally missed in my initial probe of that site.
       http://www.jrsoftware.org/is3rdparty.php.

      I obtained all my three post answers from one of the suggested third party links from thenelson's referred site
      and it included sample template scripts and notations as to how to installed OCX /Dll files; and diferent Windows
      environment.

(2). dloendorf 's further suggestion dated 04/11/2006 was an eye opener to thenelson's prior suggested links
      ...so in actual sense this gives thenelson most credit.
      dloendorf's followup of 04/15/06 for part b of my question could have been more challenging if I was able to probe
     the suggestion further.

In the case, I am splitting the points between thenelsons and dloendorf with most of the points going to thenelson's  at the ratio of 4:1

Regards
Bill
0
 
thenelsonCommented:
Your welcome, Bill.  Thanks for the points.

Nelson
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.

  • 16
  • 5
  • 4
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now