Jump to content

Windows Directory


takaharu_

Recommended Posts

Is it possible to find out the Windows directory (ie: %windir%) using mIRC? I did find one snippet on MS org that uses com objects to access the registry but it doesn't seem to work (tested with XP).

I'm working on a small script that automatically opens up an installation to make it easier for someone to install a particular program on their own and the only thing left is to find out what drive letter program files are installed on. Windows has been installed before on another hard drive so there's more than one Program Files and Windows folder.

I'm using mIRC 6.16 as it can be opened straight from a CD.

Link to comment
Share on other sites

This was part of an alias that hixxy helped me with...

Hopefully you can work it out from that...

 

alias listfonts {
...
  if ($com(fonts)) .comclose fonts
  .comopen fonts WScript.Shell
  if (!$comerr) { .echo -q $com(fonts,ExpandEnvironmentStrings,3,bstr,$+(%,windir%)) | var %d = $+($com(fonts).result,\Fonts\) | .comclose fonts }
...
}

Link to comment
Share on other sites

In the end I bypassed the problem as one hard drive had Vista, one was named "Setup Data" and the other has XP on it; I just used:

var %c = C:
:retry
if (($exists(%c $+ \users)) || (setup isin $disc(%c).label)) {
if (%c == C:) { var %c = D: | goto retry }
...
}

It worked in the end.

Link to comment
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
×
×
  • Create New...