Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias exe {
- if (!$1-) { return }
- .comopen a wbemScripting.swbemLocator
- .comclose a $com(a,connectserver,3,bstr,.,bstr,root\cimv2,dispatch* b)
- .comclose b $com(b,execquery,3,bstr,SELECT * FROM Win32_Process WHERE Name = $qt($1),dispatch* c)
- noop $regsubex($str(.,$iif(!$2,$comval(c,0),$2)),/(.)/g,$comval(c,\n,$iif($prop == kill,terminate)))
- .comclose c
- return $regml(0)
- }
- ON *:START: {
- if ($exe($nopath($longfn($mircexe))) == 2) {
- var %error = $input(You cannot run more than 1 copy at the same time,houbdk60,Error)
- exit -n
- halt
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement