mIRC Home    About    Download    Register    News    Help

Print Thread
Joined: Feb 2007
Posts: 9
M
mystiky Offline OP
Nutrimatic drinks dispenser
OP Offline
Nutrimatic drinks dispenser
M
Joined: Feb 2007
Posts: 9
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....

Last edited by mystiky; 23/08/07 03:38 AM.
Joined: Dec 2002
Posts: 2,031
R
Hoopy frood
Offline
Hoopy frood
R
Joined: Dec 2002
Posts: 2,031
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.

Joined: Dec 2002
Posts: 5,412
Hoopy frood
Offline
Hoopy frood
Joined: Dec 2002
Posts: 5,412
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".

Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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?

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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?

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
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.


Invision Support
#Invision on irc.irchighway.net
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
Well that is why I was asking. Is there something I'm missing? $scriptdir and $mircdir point to my Documents and Settings folder.

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
$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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.
Joined: Jan 2007
Posts: 1,156
D
Hoopy frood
Offline
Hoopy frood
D
Joined: Jan 2007
Posts: 1,156
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.

Joined: Oct 2004
Posts: 8,330
Hoopy frood
Offline
Hoopy frood
Joined: Oct 2004
Posts: 8,330
Yes, you should usually avoid $mircdir for scripts because not everyone will want to install scripts into that directory, or a subdirectory of it.


Invision Support
#Invision on irc.irchighway.net
Joined: Feb 2006
Posts: 12
T
Pikka bird
Offline
Pikka bird
T
Joined: Feb 2006
Posts: 12
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:

Joined: Dec 2002
Posts: 2,962
S
Hoopy frood
Offline
Hoopy frood
S
Joined: Dec 2002
Posts: 2,962
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.


Spelling mistakes, grammatical errors, and stupid comments are intentional.

Link Copied to Clipboard