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. Config files embedded in exe

Config files embedded in exe

Scheduled Pinned Locked Moved C#
csharpwindows-adminhardwarequestiondiscussion
2 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.
  • B Offline
    B Offline
    BarryJ
    wrote on last edited by
    #1

    Since it's really easy to access resources and modify them in .net, what do people think about storing application configs inside of the .exe itself (maybe storing the first date the program was ran inside of the executable itself, granted it's easy to modify, but I'm sure other methods will be used as well). Anybody have any thoughts on this? good idea? bad idea? I just think it might be nice to have an executable with no attachment to the registry and no other required files (sans runtimes).

    G 1 Reply Last reply
    0
    • B BarryJ

      Since it's really easy to access resources and modify them in .net, what do people think about storing application configs inside of the .exe itself (maybe storing the first date the program was ran inside of the executable itself, granted it's easy to modify, but I'm sure other methods will be used as well). Anybody have any thoughts on this? good idea? bad idea? I just think it might be nice to have an executable with no attachment to the registry and no other required files (sans runtimes).

      G Offline
      G Offline
      Gevik Babakhani
      wrote on last edited by
      #2

      To my opinion the general purpose of such configuration file is the ability to manipulating an application’s behavior whenever necessary. I am not sure if you could modify a .NET exe/dll file without reconstructing. Perhaps it is possible to use Soap/Binary Serialization in combination with PropertyGrid and a command line argument to do the trick. This way you create a “PropertyGrid enabled” class that holds the configuration, then you Serialize and/or DeSerialize the class when the application starts with a startup argument like /conf Any way, this is my opinion.


      C:\>csc *.cs Microsoft (R) Visual C# .NET Compiler error CS2001: Source file 'brains.cs' could not be found fatal error CS2008: No [brains.cs] specified C:\>

      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