Results 1 to 13 of 13
  1. #1
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Inno Setup Scripts (Any)

    I was struggling to understand the Nullsoft installer when I stumbled across Inno Setup, a seemingly simpler and equally free tool to build an installer. Cross-checking the Lounge, I found a post by Howard in which he said he used Inno Setup. I thought we could start a thread for those dissatisfied with the Package & Deploy Wizard which shows how to accomplish similar installations using Inno Setup.

    So, I had a COM Add-in for Outlook. I could distribute the DLL, but it needed to be installed by the user either by using the deeply buried COM Add-ins dialog or by registering it with regsvr32. An installer seemed to be the answer. (My PDW is dysfunctional with a mix of Office XP Developer and Outlook 2003, so that was no longer an option. And it made absurdly large .cab files of 4.5MB just to install one little DLL.)

    This is the entire script used to build the relatively small and completely self-contained installer in Inno Setup:

    Code:
    ; -- Outlook_Attach.iss --
    ; Created 26 Oct 2006
    
    [Setup]
    AppName=C&F Add Attachment for Outlook 2003
    AppVerName=C&F Add Attachment for Outlook 2003 ver 3.0.0.3
    DefaultDirName={userappdata}MicrosoftAddInsCFAttach
    DisableProgramGroupPage=yes
    OutputDir=.
    
    [Files]
    Source: "jfsWDX03.DLL"; DestDir: "{app}"; Flags: regserver
    Too cool!

    My next project is to install a (non-global) Word template along with an OCX (the one with the DateTimePicker, from Office XP Developer Edition). Wish me luck. <img src=/S/crossfingers.gif border=0 alt=crossfingers width=17 height=16>
    Last edited by jscher2000; 2011-11-23 at 14:34. Reason: Fixed code tags.

  2. #2
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inno Setup Scripts (Any)

    UninsHs is a <img src=/S/free.gif border=0 alt=free width=30 height=15> "extension program for Inno Setup allows you to add repair, modify and remove support to your applications with minimal effort. It is very small because use Assemble. Please read the readme file included in the package for further instructions on how to use UninsHs with your own application setups. Features : 1. Very small. 2. Easy used. 3. Support Multiple language. 4. You can add own language."

    Another one I've tried and like is RedShift Installation System - also <img src=/S/free.gif border=0 alt=free width=30 height=15> of course!

    Alan

  3. #3
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inno Setup Scripts (Any)

    i'd like to see this thread restricted to discussions on InnoSetup, not alternatives.

    I used the script below to create the program at http://www.standards.com/index.html?ChangeFileTimes

    <blockquote><hr>
    #define MainProg "ChangeFileTimes.exe"
    ;#define Major
    ;#define Minor
    ;#define Rev
    ;#define Build
    ;#expr ParseVersion(MainProg, Major, Minor, Rev, Build)
    ;#define Version Str(Major)+"."+Str(Minor)+(Rev > 0 ? "."+Str(Rev) : "")

    [Setup]
    AppName=Change File Times
    AppVerName=Change File Times
    PrivilegesRequired=admin
    DefaultDirName={pf}Howard KaikowChange File Times
    DefaultGroupName=Howard Kaikow
    OutputBaseFileName=InstallChangeFileTimes
    VersionInfoCompany=Howard Kaikow
    VersionInfoCopyright=Copyright

  4. #4
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Inno Setup Scripts (Any)

    We don't generally restrict threads, Howard. As long as posts address the topic of setup scripts/installer tools, there is no reason to exclude them, even if there aren't dealing with Inno Setup. You aren't required to respond to them or even read them.
    Charlotte

  5. #5
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inno Setup Scripts (Any)

    The idea of having tgreads to to organize discussions.
    Off topic posts, of which most of us are guilty, greatly detracts from a thread, e.g., one has to look thru them to see if they apply to the topic of the thread.
    And such posts make it more difficult to find info.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Inno Setup Scripts (Any)

    Someone searching for 'setup script' would find this thread and might find the addtional information very useful.

  7. #7
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inno Setup Scripts (Any)

    At the risk of contravening the exclusivity of this thread, I have decided to take the plunge and post some resources related to Inno scripting:

    Inno Setup Form Designer (ISFD) helps you creating custom forms for Jordan Russell's great Inno Setup. While writing basic setup scripts can be easily done with Bj

  8. #8
    Super Moderator WebGenii's Avatar
    Join Date
    Jan 2001
    Location
    Redcliff, Alberta, Canada
    Posts
    4,066
    Thanks
    2
    Thanked 5 Times in 5 Posts

    Re: Inno Setup Scripts (Any)

    Does Inno allow you to change the Registry?
    [b]Catharine Richardson (WebGenii)
    WebGenii Home Page
    Moderator: Spreadsheets, Other MS Apps, Presentation Apps, Visual Basic for Apps, Windows Mobile

  9. #9
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Inno Setup Scripts (Any)

    The program has a feature called "Pascal Scripting," which doesn't appear to be too different than VB or JavaScript. Anyway, the help file lists these Registry-related functions. You also can call DLLs or COM objects if you like:

    Registry functions

    function RegKeyExists(const RootKey: Integer; const SubKeyName: String): Boolean;
    function RegValueExists(const RootKey: Integer; const SubKeyName, ValueName: String): Boolean;

    function RegGetSubkeyNames(const RootKey: Integer; const SubKeyName: String; var Names: TArrayOfString): Boolean;
    function RegGetValueNames(const RootKey: Integer; const SubKeyName: String; var Names: TArrayOfString): Boolean;

    function RegQueryStringValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultStr: String): Boolean;
    function RegQueryMultiStringValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultStr: String): Boolean;
    function RegQueryDWordValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultDWord: Cardinal): Boolean;
    function RegQueryBinaryValue(const RootKey: Integer; const SubKeyName, ValueName: String; var ResultStr: String): Boolean;

    function RegWriteStringValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;
    function RegWriteExpandStringValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;
    function RegWriteMultiStringValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;
    function RegWriteDWordValue(const RootKey: Integer; const SubKeyName, ValueName: String; const Data: Cardinal): Boolean;
    function RegWriteBinaryValue(const RootKey: Integer; const SubKeyName, ValueName, Data: String): Boolean;

    function RegDeleteKeyIncludingSubkeys(const RootKey: Integer; const SubkeyName: String): Boolean;
    function RegDeleteKeyIfEmpty(const RootKey: Integer; const SubkeyName: String): Boolean;
    function RegDeleteValue(const RootKey: Integer; const SubKeyName, ValueName: String): Boolean;


    So far I haven't needed to try any of these myself.
    Last edited by jscher2000; 2011-11-23 at 14:35. Reason: Fixed code appearance.

  10. #10
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inno Setup Scripts (Any)

    I prefer to do registry stuff from within my own code.

    Lot's more control and security that way.

    Remember, source for Inno Setup is available, so there are no secrets,

  11. #11
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Inno Setup Scripts (Any)

    Howard, sorry, I don't understand the logistics of what you're suggesting. If you want to do registry stuff during installation, you include a separate compiled program to do that and run that during setup, or you launch your "main" program and your "main" program detect the incomplete installation and completes the setup?

  12. #12
    Gold Lounger
    Join Date
    Dec 2000
    Location
    New Hampshire, USA
    Posts
    3,386
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Inno Setup Scripts (Any)

    Either way, depending on the app.

  13. #13
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Inno Setup Scripts (Any)

    Here is the script I wrote for installing a regular-old-Word-template and a necessary (and sometimes missing) OCX supporting the DateTimePicker control:

    Code:
    ; -- Time_Report.iss --
    ; Created 6 Dec 2006
    
    [Setup]
    AppName=C&F Time Report
    AppVerName=C&F Time Report ver 6G
    DefaultDirName={pf}C&F Templates
    DisableProgramGroupPage=yes
    OutputDir=.
    
    [Files]
    Source: "TimeRpt6G.dot"; DestDir: "{userappdata}MicrosoftTemplates"
    Source: "C:WINDOWSsystem32mscomct2.ocx"; DestDir: "{sys}"; Flags: onlyifdoesntexist sharedfile uninsneveruninstall regserver
    The result is that the user finds the template under File>New>On my Computer in the "General" tab, no new program group is created on the Start menu, but there is an uninstaller available in Add/Remove Programs. I've only tested on my own PC, but hopefully this will work for all new PCs we set up. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    Last edited by jscher2000; 2011-11-23 at 14:35. Reason: Fixed code tags.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •