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. Setup and File association

Setup and File association

Scheduled Pinned Locked Moved C#
questionworkspace
5 Posts 3 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.
  • E Offline
    E Offline
    Eduard Keilholz
    wrote on last edited by
    #1

    Hey guys! In my setup project, I want my software to appear in the [Open With] context menu for a certain file extension, however if I do so, the file association makes my software the default file association in Windows for that particular extension. I Do want windows to associate my software with the file extension, but I don't want my setup to change the default association for that file extension. Is that possible?

    .: I love it when a plan comes together :. http://www.zonderpunt.nl

    G J 2 Replies Last reply
    0
    • E Eduard Keilholz

      Hey guys! In my setup project, I want my software to appear in the [Open With] context menu for a certain file extension, however if I do so, the file association makes my software the default file association in Windows for that particular extension. I Do want windows to associate my software with the file extension, but I don't want my setup to change the default association for that file extension. Is that possible?

      .: I love it when a plan comes together :. http://www.zonderpunt.nl

      G Offline
      G Offline
      GenJerDan
      wrote on last edited by
      #2

      Meaning "Don't change the association if one already exists, but create an association if it doesn't"? Me, I'd avoid doing it during Setup, and just have your application check to see if the file association is there, then prompt the user asking if they would like the assocation created or changed, as appropriate. (Kind of like email programs do if they find they're not the deafult mailer, or Quicktime with image types, etc.)

      E 1 Reply Last reply
      0
      • E Eduard Keilholz

        Hey guys! In my setup project, I want my software to appear in the [Open With] context menu for a certain file extension, however if I do so, the file association makes my software the default file association in Windows for that particular extension. I Do want windows to associate my software with the file extension, but I don't want my setup to change the default association for that file extension. Is that possible?

        .: I love it when a plan comes together :. http://www.zonderpunt.nl

        J Offline
        J Offline
        J a a n s
        wrote on last edited by
        #3

        I think you are looking for this. http://msdn.microsoft.com/en-us/library/bb166549.aspx[^] http://msdn.microsoft.com/en-us/library/bb165967.aspx[^]

        "Never put off until run time what you can do at compile time." - David Gries, in "Compiler Construction for Digital Computers", circa 1969.

        E 1 Reply Last reply
        0
        • G GenJerDan

          Meaning "Don't change the association if one already exists, but create an association if it doesn't"? Me, I'd avoid doing it during Setup, and just have your application check to see if the file association is there, then prompt the user asking if they would like the assocation created or changed, as appropriate. (Kind of like email programs do if they find they're not the deafult mailer, or Quicktime with image types, etc.)

          E Offline
          E Offline
          Eduard Keilholz
          wrote on last edited by
          #4

          The solution is to change the verb of the file association's action to openas in stead of open. The openas verb makes your software appear in the 'Open With' context menu, but doesn't change the default file association which is exactly what I wanted. Thanks for your reply!

          .: I love it when a plan comes together :. http://www.zonderpunt.nl

          1 Reply Last reply
          0
          • J J a a n s

            I think you are looking for this. http://msdn.microsoft.com/en-us/library/bb166549.aspx[^] http://msdn.microsoft.com/en-us/library/bb165967.aspx[^]

            "Never put off until run time what you can do at compile time." - David Gries, in "Compiler Construction for Digital Computers", circa 1969.

            E Offline
            E Offline
            Eduard Keilholz
            wrote on last edited by
            #5

            I found the solution ( this[^] message explains more) Thanks for your reply!

            .: I love it when a plan comes together :. http://www.zonderpunt.nl

            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