Jump to content
Sign in to follow this  
buzz44

Whats better?

Recommended Posts

buzz44

say i have a script where when u close it, it saves some stuff and when you reopen it reads the stuff so its there again .

as far as i know, you have 2 options .... Save the stuff to an INI file or to save it to the Registry and retrieve it

i was wondering what people think is "better" or more "benificial" ... saving to an INI or saving to the registry...

Edited by burrup

qq

Share this post


Link to post
Share on other sites
SlimShady

It depends. The registry is part of the system and an INI file is standalone and can be copied and moved with the main executable.

Share this post


Link to post
Share on other sites
Andre

security can easier be set on an .ini then on the registry....

Andre


What about Windows without using AutoIt ?It would be the same as driving a car without an steering Wheel!

Share this post


Link to post
Share on other sites
zcoacoaz

i prefer the registry because i don't like extra files


[font="Times"] If anyone remembers me, I am back. Maybe to stay, maybe not.----------------------------------------------------------------------------------------------------------[/font][font="Times"]Things I am proud of: Pong! in AutoIt | SearchbarMy website: F.R.I.E.S.A little website that is trying to get started: http://thepiratelounge.net/ (not mine)[/font][font="Times"] ----------------------------------------------------------------------------------------------------------[/font][font="Arial"]The newbies need to stop stealing avatars!!! It is confusing!![/font]

Share this post


Link to post
Share on other sites
buzz44

ty for your input :)

i am still undecided as what to use, my script will save to INI or Registry and when the computer boots up my script will retrieve the values from wherever they are and continoue to run.

edit: also with INI files, it depends on where u put your INI file, eg say u put it in the same folder as the script, in mycase the desktop, i am frequently deleting files from my desktop etc and would probably delete the ini file by accident, or if u put it in @TempDir some people empty that folder frequently as to remove "un-necessary" junk

i think having save it in the registry has a much less chance of getting deleted by accident

Edited by burrup

qq

Share this post


Link to post
Share on other sites
ElSoloMar

i was wondering what people think is "better" or more "benificial" ... saving to an INI or saving to the registry...

<{POST_SNAPBACK}>

I Generally go for the registry but when I go to a restricted network the administrator generally will not let you read/write anything to it. Since then, I prefer to use INI with my AutoIt scripts. They also consider the INI file more flexible and much more easy to change.

I am running a box with borg technology! The distintiveness of your brand box will be added to the colective ... protection utilities are futile!cha, cha, chachaaaanm!

Share this post


Link to post
Share on other sites
benched42

i was wondering what people think is "better" or more "benificial" ... saving to an INI or saving to the registry...

I tend to save the values in an INI file. I also include the default INI file in my script, in case the original gets deleted. If you test to see if the INI exists first, you can simply use a FileInstall() to drop a default INI file along with your script, like this:

If FileExists(@ScriptDir &"\myfile.INI") = 0 Then
  FileInstall("C:\PathTo\Original\myfile.INI",@ScriptDir&"\myfile.INI",1)
Endif

Who lied and told you life would EVER be fair?

Share this post


Link to post
Share on other sites
layer

i ditto what CyberSlug said.. but a different reason, well, what he said, they "needlesy" write to the registry, and just what IF, something went all wrong and your registry was compltetley gone, eh?? i just feel safer writing to ini's, unless it is a nesescity to write to the registry.. :)


FootbaG

Share this post


Link to post
Share on other sites
buzz44

dont hate me .... iv decided to go with writing/reading from the registry lol, only because i need to write there to tell it to boot on startup


qq

Share this post


Link to post
Share on other sites
Somerset

burrup don't hate me...

don't worry about it. you came to your conclusion. both ini and registrycalls have thier own merits, and also issues. registry can hide data yet making it availible, and an ini can store values without making them prone to registry cleaners. i figure do it as how you need it.

Edited by beerman

 

Spoiler

shoot_zpsfd329d66.png
dontbelieveeverythingyouthink_zps0e1e900

Madness is the first step to understanding...

Share this post


Link to post
Share on other sites
buzz44

ty for your support


qq

Share this post


Link to post
Share on other sites
CyberSlug

dont hate me .... iv decided to go with writing/reading from the registry lol, only because i need to write there to tell it to boot on startup

<{POST_SNAPBACK}>

That's perfectably reasonable

Use Mozilla | Take a look at My Disorganized AutoIt stuff | Very very old: AutoBuilder 11 Jan 2005 prototype I need to update my sig!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×