mIRC Home    About    Download    Register    News    Help

Print Thread
Looking for a COM to grab info about weather a.... #156704 19/08/06 03:41 PM
Joined: Oct 2005
Posts: 122
O
onesikgypo Offline OP
Vogon poet
OP Offline
Vogon poet
O
Joined: Oct 2005
Posts: 122
Hey all, im completely unfamiliar with COM's so i really need some help,

im looking for a COM thatll determine weather a particular computer has a static Internal IP or not, i know there r various ways, such as checking DHCP status etc, there may be others i do not know of, any help would be greatly appreciated

Note: would need to work for 98,nt and xp

thnx in advanced

Re: Looking for a COM to grab info about weather a #156705 19/08/06 05:49 PM
Joined: Mar 2004
Posts: 210
F
FNar Offline
Fjord artisan
Offline
Fjord artisan
F
Joined: Mar 2004
Posts: 210
ipconfig/all is so simple, why make another program for it? Just look at the results or capture them and look for the Dhcp line.

Re: Looking for a COM to grab info about weather a #156706 19/08/06 09:20 PM
Joined: Oct 2005
Posts: 122
O
onesikgypo Offline OP
Vogon poet
OP Offline
Vogon poet
O
Joined: Oct 2005
Posts: 122
i am aware of this, however i was avoiding the use of a /run cmd within the script as i didnt want to bring it up, hence why i asked for the COM

Re: Looking for a COM to grab info about weather a #156707 20/08/06 08:02 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Code:
alias cmd {
  if (!$0) return
  var %wsh = wsh $+ $ticks 
  .comopen %wsh wscript.shell
  .comclose %wsh $com(%wsh,run,1,bstr*,% $+ comspec% /c $1- >cmd.txt,uint,0,bool,true)
  .signal cmd $1-
}
on *:signal:cmd:{ window -he @cmd | filter -fwpc cmd.txt @cmd | window -aw3 @cmd }


This is something I got from FiberOPtics a while back.

/cmd tracert 127.0.0.1

Re: Looking for a COM to grab info about weather a #156708 20/08/06 10:37 PM
Joined: Mar 2004
Posts: 210
F
FNar Offline
Fjord artisan
Offline
Fjord artisan
F
Joined: Mar 2004
Posts: 210
I had problems with it unless I specified the file as c:\mirc\cmd.txt in both places. The script insisted on putting the file into my user directory, but looking for it in my mIRC directory.

Re: Looking for a COM to grab info about weather a #156709 21/08/06 05:48 AM
Joined: Feb 2005
Posts: 342
R
Rand Offline
Fjord artisan
Offline
Fjord artisan
R
Joined: Feb 2005
Posts: 342
Works fine for me.