Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Install software and menus depending upon radion button selection option used in MSI

Install software and menus depending upon radion button selection option used in MSI

Scheduled Pinned Locked Moved C#
csharptutorialworkspace
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • S Offline
    S Offline
    sjs4u
    wrote on last edited by
    #1

    Hi, I made simple winform application in C#. I am showing menu options depending upon the mode selection. .i.e. if mode is eng then I am showing all the menus in MDI and if mode is tech then I am hiding some menus of MDI.This is handled in Code. I am using MSI to create setup.I am using custom dialog box i.e. 2 radio button for mode selection. Now I want install software depeding upon the mode selection. i.e. if I select Eng mode radio button then installer install software with all menus and if I select tech mode then installer install only few menus which is applicable to tech mode. I dont know how to use custom action so that i can pass the selection option to the exe. Is there any other solution just let me know. Thanks, sjs4u

    L 1 Reply Last reply
    0
    • S sjs4u

      Hi, I made simple winform application in C#. I am showing menu options depending upon the mode selection. .i.e. if mode is eng then I am showing all the menus in MDI and if mode is tech then I am hiding some menus of MDI.This is handled in Code. I am using MSI to create setup.I am using custom dialog box i.e. 2 radio button for mode selection. Now I want install software depeding upon the mode selection. i.e. if I select Eng mode radio button then installer install software with all menus and if I select tech mode then installer install only few menus which is applicable to tech mode. I dont know how to use custom action so that i can pass the selection option to the exe. Is there any other solution just let me know. Thanks, sjs4u

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      sjs4u wrote:

      I dont know how to use custom action so that i can pass the selection option to the exe.

      So the "mode" (eng/tech) is passed as a command-line parameter? I think you could add that part in the shortcut that's being made. Alternatively, you could write a setting during the custom action[^] and check it's value on startup.

      Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

      S 1 Reply Last reply
      0
      • L Lost User

        sjs4u wrote:

        I dont know how to use custom action so that i can pass the selection option to the exe.

        So the "mode" (eng/tech) is passed as a command-line parameter? I think you could add that part in the shortcut that's being made. Alternatively, you could write a setting during the custom action[^] and check it's value on startup.

        Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

        S Offline
        S Offline
        sjs4u
        wrote on last edited by
        #3

        Hi Eddy, Thanks for your reply. Yes I am passing tech/eng mode values as commadline argument and checked that in Main Method in program.cs. Default is tech mode. In Installer Project - I set the radio button values and can able to get these values using string myInput1 = this.Context.Parameters["BUTTON1"]; string myInput2 = this.Context.Parameters["BUTTON2"]; Now when I start installer it is showing 2 radio button and in that i want selected radion button value to be passed to exe so that only that exe get installed. Regards, sjs4u

        L 1 Reply Last reply
        0
        • S sjs4u

          Hi Eddy, Thanks for your reply. Yes I am passing tech/eng mode values as commadline argument and checked that in Main Method in program.cs. Default is tech mode. In Installer Project - I set the radio button values and can able to get these values using string myInput1 = this.Context.Parameters["BUTTON1"]; string myInput2 = this.Context.Parameters["BUTTON2"]; Now when I start installer it is showing 2 radio button and in that i want selected radion button value to be passed to exe so that only that exe get installed. Regards, sjs4u

          L Offline
          L Offline
          Lost User
          wrote on last edited by
          #4

          sjs4u wrote:

          Now when I start installer it is showing 2 radio button and in that i want selected radion button value to be passed to exe so that only that exe get installed.

          Most installers will allow you to create a "default" and a "custom" setup; simply install a different shortcut on the desktop, and put the argument in there. "How" that's done will vary per installer; check it's manual.

          Bastard Programmer from Hell :suss: If you can't read my code, try converting it here[^]

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups