Reply to Thread

Post a reply to the thread: Specify Setup Type on Command Line

Your Message

Click here to log in

What's the name of our main installation product (in uppercase letters), directly followed by the current year?

 

You may choose an icon for your message from this list

Additional Options

  • Will turn www.example.com into [URL]http://www.example.com[/URL].

Topic Review (Newest First)

  • 05-23-2007, 09:51 AM
    linder

    Re: Specify Setup Type on Command Line

    Thank you for bringing this to my attention. Item in review.

    Friedrich
  • 05-23-2007, 09:25 AM
    cptcoconut

    Re: Specify Setup Type on Command Line

    That's great, thank you very much.

    While I was testing to see what formats I could pass in with the /V option, I think I've found a (very minor) bug. If I pass a colon between the variable name and value instead of a space, the setup crashes.

    Setup.exe /V SetupType:Upgrade

    Application Exception 0xc0000005
  • 05-23-2007, 08:57 AM
    linder

    Re: Specify Setup Type on Command Line

    Hello,

    Yes, good idea. This should work fine!

    You can also use the "Get System Information (Command Line)" function to retrieve the command line. Then check if a specific "upgrade switch" is defined.

    For example, you tell your customer that setup.exe /u (or whatever switch you prefer) runs the installer in upgrade mode. Just check if /u is passed through the command line and set your setup type to "Upgrade".

    Does this make sense?

    Friedrich
  • 05-23-2007, 08:45 AM
    cptcoconut

    Re: Specify Setup Type on Command Line

    Thank you, that got me headed in the right direction, but I need to let the user specify the Setup Type on the command line (it's not always Upgrade just because it's silent, they still get to choose). I think I have it working like this:

    Code:
    ! If the SetupType was passed on the command line, set it here
    ! e.g.: Setup.exe /V SetupType Upgrade
    Set Variable %SETUPTYPE% to ""
    If %SETUPTYPE% Equals (Ignore Case) "Complete" Then
       Set Active Setup Type to "Complete"
    ElseIf %SETUPTYPE% Equals (Ignore Case) "Upgrade" Then
       Set Active Setup Type to "Upgrade"
    ElseIf %SETUPTYPE% Equals (Ignore Case) "Custom" Then
       Set Active Setup Type to "Custom"
    End
    Is this the best way to accomplish it?
  • 05-23-2007, 07:52 AM
    linder

    Re: Specify Setup Type on Command Line

    Hello,

    What you can do is to detect a silent installation and, if detected, set the active setup type to Upgrade.

    You can use the following to detect a silent install:

    If %_SB_INSTALLERFLAG% Equals "1" on Position "$SB_SILENTMODEFLAG$" Then

    You can use "Set Active Setup Type" to set the type.

    Does this help?

    Friedrich Linder
    Lindersoft
    www.lindersoft.com
    +1.954.252.3910
  • 05-23-2007, 07:45 AM
    cptcoconut

    Specify Setup Type on Command Line

    I've created a setup with three Setup Types: Complete, Upgrade, and Custom. Some customers will install with the GUI, but others will require an unattended installation and will use the /S silent option.

    How can the Setup Type be passed on the command line along with the /S option (e.g. to select the Upgrade setup type)? Is it also possible to select a Custom type and select only certain Features from the command line?

Posting Permissions

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