Delphi Pages Forums  

Go Back   Delphi Pages Forums > Delphi Forum > General

Lost Password?

Reply
 
Thread Tools Display Modes
  #1  
Old 12-10-2010, 07:09 AM
Cosmin3 Cosmin3 is offline
Member
 
Join Date: Dec 2010
Posts: 33
Default save configuration in application's exe file

Hi.
I want to save the configuration of my program into its exe file (directly or in resources).
I know I can use registry or a separate configuration file but I prefer to save in exe.

I found some topics regarding this on forum but none of them solved my issue 100%.

Could you please help me..?
Thank you in advance.

Best regards, Cosmin
Reply With Quote
  #2  
Old 12-10-2010, 09:21 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,333
Default

Use the registry or a database file for configuration storage... Your app will never run on my system, because my virus scanner will not like what you're trying to achive...

So my biggest question to you, why you prefer storing configuration in the .exe itself???
Reply With Quote
  #3  
Old 12-10-2010, 11:04 AM
Cosmin3 Cosmin3 is offline
Member
 
Join Date: Dec 2010
Posts: 33
Default

Because I'm trying to make my application as lite/portable as possible.
Reply With Quote
  #4  
Old 12-10-2010, 11:11 AM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,333
Default

Again, your app will never run on my system.

PRO: You'll have a lite/portable app.
CON: Users need to believe that your app is only storing configuration data and exclude your app from the virus scanner (which contradicts with your PRO, so there is no PRO anymore, just a CON)...

So you see, the CON is much bigger (beyond compare) then the PRO... Go for a separate configuration file/registry...
Reply With Quote
  #5  
Old 12-10-2010, 11:51 AM
Cosmin3 Cosmin3 is offline
Member
 
Join Date: Dec 2010
Posts: 33
Default

You're right but not 100%.
The fact that my program will modify itself it will seem a little suspicious, I agree, but just a little.
"Users need to believe" that means you personally need to believe, not all the others.
If you don't believe that's your right not to use my program but don't judge for others.
In my 25 years in front of a computer I saw many such exe files and I didn't see others so worried about them.
Anyway every program can be verified by others on internet in many ways.
I saw legitimate programs that were using configuration files and/or registry but which they were trojans.

If you don't wanna help me, that's your right also, but this is a forum where people help each other, not judge.
On other forums I saw this question and people trying to help.

I understood that, in your own way, you are trying to help the users also.

I will think at your opinion and decide. Until then I still wanna know how to do this (from anybody else, of course).
Reply With Quote
  #6  
Old 12-10-2010, 12:00 PM
Norrit Norrit is offline
Moderator
 
Join Date: Aug 2001
Location: Landgraaf
Posts: 7,333
Default

It's not that I'm not willing to help you, it's just that in the past had the same request (store data in the app) from my boss... I Build it, but in live situations it produced more cons then pros and therefor this feature was replaced by a simple configuration file...

My reply was just to make you think about what you're asking and oversee the consequences...
I don't have the code anymore, but in the weekend I'll look if I can recreate part of it to give you a sample on howto do...
Reply With Quote
  #7  
Old 12-10-2010, 12:14 PM
Cosmin3 Cosmin3 is offline
Member
 
Join Date: Dec 2010
Posts: 33
Default

Ok, I understand, thank you.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On

Forum Jump


All times are GMT. The time now is 09:31 AM.


Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2019, vBulletin Solutions, Inc.