473,588 Members | 2,474 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Single Exe - No install program - Storing Settings

Hi,

I have been asked to create a solution in a single exe - using C# .NET 3.5.

I have found that I can us ILMerge to create a single exe of all of my
Application assemblies.

But my question is what to do about settings/config?

I have some settings should be settings which should be shared between
instances of the application but these settings could be changed by the user
overtime.

This is why I would not use the registy - let the user specify the settings
at first run.

Thanks in advance.

Lars
Sep 19 '08 #1
11 3076
Well you arent going to easily be able to recompile your app to change user
settings at runtime so I would suggest that an XML file or the registry are
the best way to go.

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:
Hi,

I have been asked to create a solution in a single exe - using C# .NET 3.5.

I have found that I can us ILMerge to create a single exe of all of my
Application assemblies.

But my question is what to do about settings/config?

I have some settings should be settings which should be shared between
instances of the application but these settings could be changed by the user
overtime.

This is why I would not use the registy - let the user specify the settings
at first run.

Thanks in advance.

Lars
Sep 19 '08 #2
I normally use xml or registy to store setting, but

The point about the application is that it should be easy to copy between
users simply by copy one file not have to copy several files - I know it
might be difficult/impossible thing to achieve.

Lars

"Ciaran O''Donnell" wrote:
Well you arent going to easily be able to recompile your app to change user
settings at runtime so I would suggest that an XML file or the registry are
the best way to go.

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:
Hi,

I have been asked to create a solution in a single exe - using C# .NET 3.5.

I have found that I can us ILMerge to create a single exe of all of my
Application assemblies.

But my question is what to do about settings/config?

I have some settings should be settings which should be shared between
instances of the application but these settings could be changed by the user
overtime.

This is why I would not use the registy - let the user specify the settings
at first run.

Thanks in advance.

Lars
Sep 19 '08 #3
If these users are in a corporate network then you should look at have a
central file somewhere they can all access, or if they are spread out over
the net then potentially a webservice where they can get the settings. It is
quite ellaborate to do that but you are asking for a difficult thing. The
settings will have to be somewhere.
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:
I normally use xml or registy to store setting, but

The point about the application is that it should be easy to copy between
users simply by copy one file not have to copy several files - I know it
might be difficult/impossible thing to achieve.

Lars

"Ciaran O''Donnell" wrote:
Well you arent going to easily be able to recompile your app to change user
settings at runtime so I would suggest that an XML file or the registry are
the best way to go.

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:
Hi,
>
I have been asked to create a solution in a single exe - using C# .NET 3.5.
>
I have found that I can us ILMerge to create a single exe of all of my
Application assemblies.
>
But my question is what to do about settings/config?
>
I have some settings should be settings which should be shared between
instances of the application but these settings could be changed by the user
overtime.
>
This is why I would not use the registy - let the user specify the settings
at first run.
>
Thanks in advance.
>
Lars
Sep 19 '08 #4
Well unfortunately the users will not be on the same coporate network or may
not even have a network connection.

Could I have the settings as an embedded rescource and the alter it when
needed?

Lars

"Ciaran O''Donnell" wrote:
If these users are in a corporate network then you should look at have a
central file somewhere they can all access, or if they are spread out over
the net then potentially a webservice where they can get the settings. It is
quite ellaborate to do that but you are asking for a difficult thing. The
settings will have to be somewhere.
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:
I normally use xml or registy to store setting, but

The point about the application is that it should be easy to copy between
users simply by copy one file not have to copy several files - I know it
might be difficult/impossible thing to achieve.

Lars

"Ciaran O''Donnell" wrote:
Well you arent going to easily be able to recompile your app to change user
settings at runtime so I would suggest that an XML file or the registry are
the best way to go.
>
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
>
>
"pbcoder" wrote:
>
Hi,

I have been asked to create a solution in a single exe - using C# .NET 3.5.

I have found that I can us ILMerge to create a single exe of all of my
Application assemblies.

But my question is what to do about settings/config?

I have some settings should be settings which should be shared between
instances of the application but these settings could be changed by the user
overtime.

This is why I would not use the registy - let the user specify the settings
at first run.

Thanks in advance.

Lars
Sep 19 '08 #5
Embedded resources are embedded into your application so you would need to
dissasemble the app, edit the settings file and reassemble it. Then work out
a way to replace the file which the application is still running.

Good luck with that, it will be impressive when you have finished
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:
Well unfortunately the users will not be on the same coporate network or may
not even have a network connection.

Could I have the settings as an embedded rescource and the alter it when
needed?

Lars

"Ciaran O''Donnell" wrote:
If these users are in a corporate network then you should look at have a
central file somewhere they can all access, or if they are spread out over
the net then potentially a webservice where they can get the settings. It is
quite ellaborate to do that but you are asking for a difficult thing. The
settings will have to be somewhere.
--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:
I normally use xml or registy to store setting, but
>
The point about the application is that it should be easy to copy between
users simply by copy one file not have to copy several files - I know it
might be difficult/impossible thing to achieve.
>
Lars
>
"Ciaran O''Donnell" wrote:
>
Well you arent going to easily be able to recompile your app to change user
settings at runtime so I would suggest that an XML file or the registry are
the best way to go.

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com


"pbcoder" wrote:

Hi,
>
I have been asked to create a solution in a single exe - using C# .NET 3.5.
>
I have found that I can us ILMerge to create a single exe of all of my
Application assemblies.
>
But my question is what to do about settings/config?
>
I have some settings should be settings which should be shared between
instances of the application but these settings could be changed by the user
overtime.
>
This is why I would not use the registy - let the user specify the settings
at first run.
>
Thanks in advance.
>
Lars
Sep 19 '08 #6
Ok - that sounds like a job for the weekend ;-).

I'll see if the my customer might change the requirements for the particular
appllication, since this is going to take some time to acheive.

Thank you for your time Ciaran
Sep 19 '08 #7
On reflection, you could possibly make the app a self extracting zip file
which extracts the EXE and a settings file and then starts the app, then when
you app closes, it can repack the settings file and itself into the exe. You
would probably want a tool for this bit which could be in the zip too.
So the app isnt single exe when running but when not running, it is.
Just an idea for you to think about.
Another option would possibly be to figure out whether you can access any
part of the exe file directly and modify some of it. Possibly add a few bytes
at the end which you can treat as structure storage and write the settings
to. I dont remember if the framework will checksum the exe when it loads it
or if this only happens for strong named assemblies.

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:
Ok - that sounds like a job for the weekend ;-).

I'll see if the my customer might change the requirements for the particular
appllication, since this is going to take some time to acheive.

Thank you for your time Ciaran
Sep 19 '08 #8
pbcoder wrote:
Hi,

I have been asked to create a solution in a single exe - using C#
.NET 3.5.

I have found that I can us ILMerge to create a single exe of all of
my
Application assemblies.

But my question is what to do about settings/config?

I have some settings should be settings which should be shared
between
instances of the application but these settings could be changed by
the user overtime.

This is why I would not use the registy - let the user specify the
settings at first run.

Thanks in advance.
Uh, why does using the registry preclude letting the user specify the
settings on the first run?

--
--
--John
to email, dial "usenet" and validate
(was jclarke at eye bee em dot net)
Sep 19 '08 #9
Hi Ciaran,

excellent idea about the zip file - i think i will proceed with that idea.

Thank you for your inputs.

"Ciaran O''Donnell" wrote:
On reflection, you could possibly make the app a self extracting zip file
which extracts the EXE and a settings file and then starts the app, then when
you app closes, it can repack the settings file and itself into the exe. You
would probably want a tool for this bit which could be in the zip too.
So the app isnt single exe when running but when not running, it is.
Just an idea for you to think about.
Another option would possibly be to figure out whether you can access any
part of the exe file directly and modify some of it. Possibly add a few bytes
at the end which you can treat as structure storage and write the settings
to. I dont remember if the framework will checksum the exe when it loads it
or if this only happens for strong named assemblies.

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"pbcoder" wrote:
Ok - that sounds like a job for the weekend ;-).

I'll see if the my customer might change the requirements for the particular
appllication, since this is going to take some time to acheive.

Thank you for your time Ciaran
Sep 22 '08 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

11
22938
by: Tom_OM | last post by:
I just got a new computer and am having a beast of a time getting Visual Studio to install on it. The computer is an HP Pavilion a750e with an AMD Athlon 64/3700 processor, a gig of RAM, a 250 gig hard drive, and Windows XP Professional. I have MS Visual Studio Professional 6. The install process copies all the files to the hard drive -- the progress bar completes. Then I get the message, "Setup is updating your system" and then I...
2
1752
by: KennethBohman | last post by:
Hi everybody, Question: how can I use the executable.config-files during installation? The answer might seem obvious, but there is apparently more to it! My itention was, as part of the iinstallation, to write write two settings to the .config file for the executable. I don't usually do that, but for such a small application I thought it would be alright. I created a simple Install class, added an override for the Install
7
4994
by: p | last post by:
WE had a Crystal 8 WebApp using vs 2002 which we upgraded to VS2003. I also have Crystal 9 pro on my development machine. The web app runs fine on my dev machine but am having problems deploying. I created the websetup and built the MSI, have the bundled version. Copied to webserver and ran Websetup.msi. Said I had to remove old version, which I did, then reran WebSetup.msi and keeps giving me this error. "The installer was interrupted...
1
4006
by: Lori | last post by:
I created an install for my program. During installation, 3 User Interface dialogs display asking for values that will be stored in the registry. I'm not registering anything, just storing values for database connections and where the program can locate necessary files. I've found that if there's a blank space in any of these input values (ie. a path name of c:\Program Files\Data\) that an error displays and the installation aborts. The...
0
1106
odyth
by: odyth | last post by:
not sure if anyone is having trouble with this, but the same thing happened to me. i have one text box in a custom dialog in my installer that would take the path to a database, if there was a space in the path ie c:\program files\ it would error out. i figured out that if i changed the edit1property for the text box from EDITA1 which is the default to something else like MYBOX it would work fine with no errors. Original message: Custom...
8
4718
by: deciacco | last post by:
I created a deployment project for my .net 2 application in vs 2005. In the properties of the deployment project, under prerequisites i have "Create setup program to install prerequisite components" checked and the ".Net Framework 2.0" prerequisite selected. The install location is set to "Download prerequisite from component's vendor's web site". After I create the setup file I click on the msi file and if the .Net framework is not...
7
10481
by: buzzluck68 | last post by:
Hello, I have an in house application that we developed, but everyone who needs to use the program are not allowed to be local admins on their PCs. I was wondering if there was a way to code the application to not require admin rights (for modifying/creating excel and text files as well as modifying the registry)? And I was wondering if there was a way around needing admin rights for creating a setup package for the program?
2
3065
by: Tim Kelley | last post by:
I have an application that I have distributed using one click install. I selected the option to allow the program to be run if the server is offline. From another program I want to be able to check if the first program is running (easy enough) and start it (not so easy) if it is not running. The shortcut that is created in the start menu is an application reference. My question is, how do I replicate the function of the application...
1
1108
by: Joern Schou-Rode | last post by:
Hi all, I am working on a project where we need to host a growing number of web sites (initially around 15). In terms of functionality the sites are identical, and the only differences lies in some application settings (UI language, layout template, etc.). Thus, we are really talking about one web application, installed and configured to run under several "identities". It seems to me that two alternative approaches exists on how to...
0
7929
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
7862
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8357
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
7987
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
6634
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5398
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
3847
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
3887
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1196
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.