mIRC Homepage
Ok I have mirc setup now, and running fine, no registry stuff at all.
What I wanna do now is have a variable in my shortcut.

To use mirc portable you need a -portable in the path (mirc.exe -portable).....well you can't put that in the main .exe file, you have to make a shortcut and then put the path and switch in. (mirc.exe -portable)

The path is now H:\ drive. When I go to another machine, the flash drive will then be seen as say Q:\ drive. Now since the sortcut I made earlier pertains to H:\ (H:\mirc\mirc.exe -portable)in order to get that shortcut I created earlier to work I would have to change the H:\ to Q:\ manually.

Is there a possible way to make a shortcut like universal, with say a variable. I tried %drive%\mirc\mirc.exe -portable, but it just tells me the path is incorrect.

Any help is greatly appreciated and thanks in advance
%apppath%?
nope, didn't work either.
I think you can't do it via a shortcut, IF this IS the case, then mirc still isn't truely portable, because I will have to change manually the path to that drive for each machine if the drive letter changes, unless anyone has a solution this really isn't much difference than the normal mirc's, other than the registry stuff is now put in the ini file, and not the reg.
Well it's not really mIRC's fault that Windows shortcuts suck and don't support relative paths. In any case, you can create a one-line batch file to run mIRC appropriately:

  • Create a new file called mirc.bat.
  • Open the file in a text editor and input the following line:
    Quote:
    start /D"[color:red]blah\moo\mircpath" mirc.exe -portable[/color]
  • Obviously blah\moo\mircpath should be a relative path between the location of the batch file you're creating and the directory containing mIRC.exe
  • Save the file and you're done.

You can now run the batch file instead of a shortcut and it'll work regardless of drive letter.
Originally Posted By: starbucks_mafia
Well it's not really mIRC's fault that Windows shortcuts suck and don't support relative paths. In any case, you can create a one-line batch file to run mIRC appropriately:

  • Create a new file called mirc.bat.
  • Open the file in a text editor and input the following line:
    Quote:
    start /D"[color:red]blah\moo\mircpath" mirc.exe -portable[/color]
  • Obviously blah\moo\mircpath should be a relative path between the location of the batch file you're creating and the directory containing mIRC.exe
  • Save the file and you're done.

You can now run the batch file instead of a shortcut and it'll work regardless of drive letter.


If I am understnding this correctly if my exe is in program files\mirc\mirc.exe I would put as follows:
start /D"program files\mirc" mirc.exe -portable

That look right? sorry not to good with batch files or html or mirc scripting or anything pertained to a type of codeing, so sorry if I sound ignorant to it smile.

I tried start /D"program files\mirc" mirc.exe -portable and ran it but nothing happend
Well it's relative to the location of the batch file so...

If:
mirc.exe was on <USBDrive>:\Program Files\mirc\mirc.exe
and:
mirc.bat was on <USBDrive>:\somewhere\moo\mirc.bat

then you would have to use:
start /D"..\..\Program Files\mirc" mirc.exe -portable

The two sets of .. at the start are to go "up" two levels from <USBDrive>:\somewhere\moo\ to <USBDrive>:\, then from there you can go "down" into Program Files etc.
Thankyou so VERY VERY much, that worked nicely.

Tested it at school, at school my flash is G: the shortcut is H: I just ran the bat file and vwala it runs.
© mIRC Discussion Forums