mIRC Homepage

Location of data (.INI) files for mIRC 6.3?

Posted By: mystiky

Location of data (.INI) files for mIRC 6.3? - 23/08/07 03:38 AM

I am now running mIRC 6.3 on my Vista. My "old" 6.21 data files were imported correctly and everything is running well.

However, for the life of me, I cannot find the location where the 6.3 data files (ending in .INI) are being kept. I checked inside \Program Files\mIRC folder, but they seem not to be there.

The files I am talking about are:

servers.ini
mirc.ini
and etc....
Posted By: RoCk

Re: Location of data (.INI) files for mIRC 6.3? - 23/08/07 12:00 PM

They're in the application data folder. In mIRC 6.3 type //echo -a $mircdir

From versions.txt

20. For Vista compatibility, new installations of mIRC now save all
settings in the User's "Application Data\mIRC" folder by default.

However, if the installer or mIRC find mirc.ini in the same folder
as mirc.exe they will use the mirc.exe folder for all settings.
Users installing over an old version of mIRC should therefore see
no change in behaviour.

The installer is now also aware of administrator and standard user
accounts and installs mIRC accordingly.
Posted By: Khaled

Re: Location of data (.INI) files for mIRC 6.3? - 23/08/07 01:32 PM

Under Vista, applications can no longer store settings in the "Program Files" folder, settings must now be stored in the Users Data folder. The easiest way to find your mIRC settings folder (if your mIRC is using the default mIRC download folder location) is to open the Tools menu in the mIRC menubar and select "Received Files".
Posted By: DJ_Sol

Re: Location of data (.INI) files for mIRC 6.3? - 27/08/07 08:14 PM

smile What about all my script files? (.mrc and .ini)

I have a folder in my program file that has my scripts in it. In this folder I have a folder with all my images in it.

E:\Script\MyScript\MyFolder\Imgs\

I used to use \MyFolder\Imgs\image2.jpg as a path. But now it looks in C:\Documents and Settings\App Data\mIRc\ for the folder.

How does this work? A normal mIRC user has a few different mIRC scripts. $scriptdir and $mircdir point to the doc and settings folder. $mircexe points to the correct folder and I could start using something like $remove($mircexe,mirc.exe) but it just seems weird to me.

I give someone my script in a zipfile with all its files and images. They unzip this zip file to a folder and what ... have to move all my script files and images to the document and settings folder? I guess I could move them all to $scriptdir or $mircdir, it just seems weird to me. If I have 4 different scripts going, all their files are in the same folder in docs and settings?
Posted By: starbucks_mafia

Re: Location of data (.INI) files for mIRC 6.3? - 27/08/07 08:50 PM

Quote:
I guess I could move them all to $scriptdir or $mircdir, it just seems weird to me. If I have 4 different scripts going, all their files are in the same folder in docs and settings?

Yes, which is a good thing. Why shouldn't a user have all their settings in their user folder (or rather a subdirectory of it)? As for scripts, they can be installed wherever the user chooses (providing he has the necessary user rights). Any user can install scripts for himself, while a user with admin privileges can also choose to install a script for all users.

Wherever the scripts themselves are stored, you should always use $mircdir (or a subdirectory of it, ie. $+($mircdir, ScriptName)) for your script settings and files that are unique for each user. This way it is always guaranteed to be accessible to the user regardless of their privileges on the machine and you can be confident that the settings will behave in the same way as the rest of the user's mIRC settings (either on a user-by-user basis or everyone using the same if that's how mIRC has been set up).

Obviously if your script has files which are not unique to each user and that simply need to be readable to each user (ie. images or other script resources) then they should be installed with the script files themselves and referenced relative to $scriptdir.
Posted By: DJ_Sol

Re: Location of data (.INI) files for mIRC 6.3? - 27/08/07 10:53 PM

So now I will need to move all my script files to the documents and settings folder?

Some person downloads the zip file of my script. They unzip it to some folder. On start I should have mIRC move all my script files to the document and settings/app data/mirc/ folder?
Posted By: Riamus2

Re: Location of data (.INI) files for mIRC 6.3? - 28/08/07 01:26 AM

No. Scripts can be stored anywhere. You just need to use the correct location when calling them. $scriptdir will be correct wherever you install the script.
Posted By: DJ_Sol

Re: Location of data (.INI) files for mIRC 6.3? - 28/08/07 02:42 AM

Well that is why I was asking. Is there something I'm missing? $scriptdir and $mircdir point to my Documents and Settings folder.
Posted By: starbucks_mafia

Re: Location of data (.INI) files for mIRC 6.3? - 28/08/07 03:15 AM

$scriptdir will point to the directory containing the currently executing script, so it will point to wherever someone installs your script. If you use it from the command-line it defaults to the same location as $mircdir, but that's irrelevant.

If you use $scriptdir in your scripts when referring to resources the script will use but will not change then you'll be fine, for everything that will change (ie. users settings etc.), they should be put in a subdirectory of $mircdir for the reasons I mentioned previously.
Posted By: DJ_Sol

Re: Location of data (.INI) files for mIRC 6.3? - 28/08/07 06:36 AM

Oh ok, that makes better sense. Yeah I was checking from the edit box which would make sense as to why $scriptdir pointed to the same dir as $mircdir.

Thank you.

For the record, in my scripts I was trying to point directly to the file path. Example:

Script is in E:/bots/script1/folder1/imgs/img1.ico

$mircexe == E:/bots/script1/mirc.exe

So if I wanted the icon I would say /folder1/imgs/img1.ico

I guess this is $mircdir which is now in the user folder. SO I just need to change these to $scriptdir. Thank you.
Posted By: Riamus2

Re: Location of data (.INI) files for mIRC 6.3? - 28/08/07 11:29 AM

Yes, you should usually avoid $mircdir for scripts because not everyone will want to install scripts into that directory, or a subdirectory of it.
Posted By: ThiefMaster

Re: Location of data (.INI) files for mIRC 6.3? - 16/09/07 09:13 AM

IMHO this way of Vista compatibility is bad. If mIRC finds a mirc.ini in the program folder it should ALWAYS use this one - no matter if it was there during installation or not.

Why? If you put mirc on an USB stick you obviously do not run an install when using it on another PC:
Posted By: starbucks_mafia

Re: Location of data (.INI) files for mIRC 6.3? - 16/09/07 01:27 PM

Err... mIRC does use settings from its current directory in preference to the user directory if a mirc.ini is found there.

If you're running from a USB drive though you should also use the -portable command line switch otherwise some data will be left in the host computer's registry.
© 2020 mIRC Discussion Forums