• Inno Setup Scripts (Any)

    Author
    Topic
    #436650

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

    Viewing 3 reply threads
    Author
    Replies
    • #1035828

      UninsHs is a free “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 free of course!

      Alan

    • #1036116

      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%5B/url%5D


      #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

      • #1036185

        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.

        • #1036239

          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.

          • #1036243

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

      • #1037484

        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

    • #1037976

      Does Inno allow you to change the Registry?

      • #1038005

        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;[/font]

        So far I haven’t needed to try any of these myself.

        • #1038426

          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,

          • #1038508

            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?

    • #1042238

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

    Viewing 3 reply threads
    Reply To: Inno Setup Scripts (Any)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: