Are there any errors generated in your script?
I'd put an error startement behind every COM line just to be sure that it all works correctly, like
code:
break on

$obj = GetObject("winmgmts:Win32_Process")
? ''+@ERROR+' - '+@SERROR
$ok = $obj.Create("Calc")
? ''+@ERROR+' - '+@SERROR

$obj = ""

$obj2 = GetObject("Winmgmts:").ExecQuery("Select * FROM Win32_Process Where Name = 'calc.exe'")
? ''+@ERROR+' - '+@SERROR
For each $n in $obj2
$name = $n.name
? $name
? ''+@ERROR+' - '+@SERROR
Next
If $name <> ""
? "Calculator is active"
Endif

? "Close Calculator here. Press a key to continue."
get $_

$name = ""
$obj3 = GetObject("Winmgmts:").ExecQuery("Select * FROM Win32_Process Where Name = 'calc.exe'")
? ''+@ERROR+' - '+@SERROR
For each $n in $obj3
$name = $n.name
$name
? ''+@ERROR+' - '+@SERROR
Next
If $name <> ""
? "Calculator is active"
Endif

The code posted above works like a charm for me.
_________________________
There are two types of vessels, submarines and targets.