Pocket PC FAQ Forums Forum Index Pocket PC FAQ Forums
The place to discuss Windows Mobile, Pocket PCs, Smartphones, Handheld PCs, Windows CE and More!
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

What is .ini file?

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Pocket PC FAQ Forums Forum Index -> SmartPhone Developers
View previous topic :: View next topic  
Author Message
priyajon
Pocketeer


Joined: 21 Aug 2008
Posts: 6

PostPosted: Fri Nov 14, 2008 12:10 pm    Post subject: What is .ini file? Reply with quote

hi,

As i'm new to Windows Mobile OS platform, would like to know 'What is 'ini' file? and What is the use of it in code?'.
could anyone please explain me and give me the link to study about it?

thanks.
Back to top
View user's profile Send private message
Gerard
Administrator


Joined: 01 Sep 2000
Posts: 2346
Location: Vancouver, BC, Canada

PostPosted: Fri Nov 14, 2008 1:20 pm    Post subject: Reply with quote

I am not a programmer, but can at least say that an INI, generally speaking, is a text file with lines of instructions for a program to follow on launch and during operation. nPOPuk is an email client I use, for example, and it uses an INI file for many functions. If deleted and then launched without the INI, or on first launch, an INI file is generated by the EXE. There will be a basic list of functions/instructions in this INI. Some may be modified by user options selected as preferences within the UI of the program. All INI elements may also be modified in a text editor while the program itself is not running, so that on next launch these new instructions (if properly edited/added) will modify behaviors within the program while running. One line, for example, selects whether or not to call the device Pocket Outlook Contacts database to fill an Address.lst file with email addresses and accompanying names. By default this is not used, but by toggling a line from a 0 value to a value of 1, the PO database is accessed for later use in building email lists or selecting individual addresses. Other options control email server selection and download behaviors, font scale and face display, and many, many other options.

More generally, a lot of programs in Win32 programs use INI files in similar ways. In a Pocket PC this is not so common, but does apply for some programs. You may learn a lot about INI functions with specific programs simply by opening them in a notepad or other word processing software.
Back to top
View user's profile Send private message
ChrisDeHerrera
Site Admin


Joined: 01 Feb 2000
Posts: 7017
Location: Los Angeles, CA, USA

PostPosted: Tue Nov 18, 2008 9:16 pm    Post subject: Reply with quote

Hi,
.ini files are no longer recommended by Microsoft. With Windows 3.x, the .ini file was used to keep track of settings for applications. Now these settings are stored in the registry.
_________________
Chris De Herrera
Microsoft MVP - Mobile Devices & Tablet PC
http://www.pocketpcfaq.com- The most complete set of FAQs on Windows CE
http://www.tabletpctalk.com - Get the latest Tablet PC News
http://www.pocketpctalk.com - Get the latest Pocket PC News
http://www.mobilitytalk.com - Quickly view all the Pocket PC & Tablet PC News on one page
Back to top
View user's profile Send private message Visit poster's website
Gerard
Administrator


Joined: 01 Sep 2000
Posts: 2346
Location: Vancouver, BC, Canada

PostPosted: Tue Nov 18, 2008 9:48 pm    Post subject: Reply with quote

Microsoft may recommend against using INI files, but for user preferences in a given program to be used portably (ie; running a mail program or browser from a USB stick or memory card), I know of no better means of retaining this information. This is not only for reasons of convenience - the portable INI file goes everywhere alongside the EXE on the same portable storage media, making it unnecessary to re-do the settings when using with different computers - but also for security reasons. For example, if one leaves username/password type data in the registry of a host machine while in a web cafe or someone else's workplace or home, then moves on, perhaps never to return to that place, what is to prevent some other random user from accessing that data by looking into the registry? This is one of the many basic problems with storing important data in the registry. A small, plaintext INI is a very convenient storage tool for such information, and of course can be secured by various means on a portable device including a thumbprint scanner in a USB stick, an encrypted RAR or ZIP archive to wrap the program folder, and other methods.
Back to top
View user's profile Send private message
tarts
Pocketeer


Joined: 20 Oct 2009
Posts: 1

PostPosted: Tue Oct 20, 2009 3:12 am    Post subject: Reply with quote

Hi all
When I open one computer program's INI file with notepad it looks like this:


Is this coded somehow? Why I can't see the text? I can view other ini files in my computer correctly though.
Back to top
View user's profile Send private message
Gerard
Administrator


Joined: 01 Sep 2000
Posts: 2346
Location: Vancouver, BC, Canada

PostPosted: Sun Feb 14, 2010 12:10 pm    Post subject: Reply with quote

Sorry for the very late reply, I didn't notice your post until now. There are some special characters which Notepad cannot see through. I am not well versed in exact rules for this, but it seems certain header lines prevent the program (and more so the Pocket PC versions, such as Tillanosoft pNotepad) from reading such content. Usually one can find an alternate text editor which will allow viewing contents. The built-in notepad of TotalCommanderCE for example, can usually see any text file's contents.
Back to top
View user's profile Send private message
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Pocket PC FAQ Forums Forum Index -> SmartPhone Developers All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



Copyright 2001-2010, Chris De Herrera, All Rights Reserved

Powered by phpBB © 2001, 2005 phpBB Group