Jump to content

Recommended Posts

Posted

I have a report from a user that the autoit application works fine when run normally, but when it's invoked as a new process from another program, it freezes:

Func GetStuff()
    Local $wbemFlagReturnImmediately = 0x10
    Local $wbemFlagForwardOnly = 0x20
    Local $colItems = "", $key='', $seed, $objItem, $i, $drives
    Local $objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2")
    If IsObj($objWMIService) Then
        $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration", "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
        If IsObj($colItems) then
           For $objItem In $colItems               <<<<<<<--------------Script freezes on this line the first time, every time.
               If StringLen($objItem.MACAddress) > 0 Then
               .
               .
               .

I'm stumped, can't reproduce it in windows 2000. He runs XP, SP2. script compiled with 3.2.7.4.

any help is appreciated.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...