takaharu_ Posted May 5, 2008 Report Share Posted May 5, 2008 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 More sharing options...
The Gate Keeper Posted May 6, 2008 Report Share Posted May 6, 2008 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 More sharing options...
takaharu_ Posted May 6, 2008 Author Report Share Posted May 6, 2008 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now