Advertisement
westor

Run mIRC.exe 1 copy only!

Dec 21st, 2014
394
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.57 KB | None | 0 0
  1. alias exe {
  2.   if (!$1-) { return }
  3.   .comopen a wbemScripting.swbemLocator
  4.   .comclose a $com(a,connectserver,3,bstr,.,bstr,root\cimv2,dispatch* b)
  5.   .comclose b $com(b,execquery,3,bstr,SELECT * FROM Win32_Process WHERE Name = $qt($1),dispatch* c)
  6.   noop $regsubex($str(.,$iif(!$2,$comval(c,0),$2)),/(.)/g,$comval(c,\n,$iif($prop == kill,terminate)))
  7.   .comclose c
  8.   return $regml(0)
  9. }
  10.  
  11. ON *:START: {
  12.   if ($exe($nopath($longfn($mircexe))) == 2) {
  13.     var %error = $input(You cannot run more than 1 copy at the same time,houbdk60,Error)
  14.     exit -n
  15.     halt
  16.   }
  17. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement