Re: Custom Resource

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



"Saul775" <Saul775@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:EC49984D-F207-4A95-B89B-623FC78EBAB8@xxxxxxxxxxxxx
Just a quick question. I've an application that I would like to
store some information about various settings current to the
application. However, I'd like to store the settings to the .EXE if
possible.

You can't write to the EXE while that EXE is running. In other words, an
application cannot write into its own executable file. You could, in
principle, create a second executable whose only job is to write the
data into the first one when it shuts down.

Further, it is more and more common for an application to be installed
in a directory an ordinary user has a read-only access to. With Vista
this is the behavior out of the box. An application thus installed won't
be able to modify its executable file either.

All in all, this is a bad idea, in my humble opinion. I suggest you
investigate alternatives.
--
With best wishes,
Igor Tandetnik

With sufficient thrust, pigs fly just fine. However, this is not
necessarily a good idea. It is hard to be sure where they are going to
land, and it could be dangerous sitting under them as they fly
overhead. -- RFC 1925


.



Relevant Pages

  • Re: black magic resource editing
    ... > I need to have an atomic application (exe) that will store all of it's ... > settings it will physically alter itself with settings. ... except some user's Documents and Settings directory. ...
    (microsoft.public.vc.language)
  • Re: VS2005 compatibility
    ... Paul T. ... I know the Link have the Heap and Stack memory settings. ... The EXE could really be bad. ... You say "I can download the program to the target device to run ...
    (microsoft.public.windowsce.app.development)
  • Re: Can this be done?
    ... That's got a great primer on attaching multiple applications to a single ActiveX EXE, and some of the issues involved. ... access the already created ActX DLL to read settings that are already set. ... Obviously I can use my second EXE to create an instance of that DLL, ...
    (microsoft.public.vb.general.discussion)
  • My.Settings Thoughts
    ... was a GLOBAL shared memory map that allowed the EXE and her .NET dlls to shared this "namespace" ... But for the settings, it uses the same file, but the sections are different. ... To provide access to the EXE, I had created Get/Set properties but I did that in the Form partial class. ... That way it can be used by the application DLLs. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: WSE 3.0 settings
    ... I can make it work by putting all settings in main ... I want to use third party DLL (Or I have to develop a DLL to be used in other ... config file and put it in my main exe file. ...
    (microsoft.public.dotnet.framework.webservices.enhancements)