WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.


Control Manager

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

cGetSBText and UAC

 Keywords: cGetSBText 229 Timeout Error IE UAC Protected Mode Windows 7 8 Medium Integrity


I am having the problem on Windows 7 with IE 10. No matter what I try I cannot get to the status bar I am looking for... I get the 229 Timeout error on the cGetSBtext line
title = "Statusbar Text"
BoxOpen(title, "")
While 1
   If IsKeyDown(@SHIFT) Then Break
   ; Find the IE status bar control
   ;window1=DllHwnd("~Internet Explorer")
   window2=cWndByClass(window1,`Frame Tab`)
   ControlHandle=cWndByClass(window3,`msctls_statusbar32`) ; this may be more generic
   if window1 == 0 || window2 == 0 || window3 == 0 || ControlHandle == 0 then Continue
   sbtext=cGetSBText(ControlHandle) ;Reads statusbar text
   if sbtext == "" || sbtext == 0 then Continue


With UAC on you need to get IE up to medium integrity level by tuning of protected mode and you need to move your script down to medium level by changing the extension to either .wbt_if or .wbt_it. With UAC off it just works.

Turning of protected mode doesn't always take for some reason. You need to kill IE, wait a few minutes, and then restart it. Some times you have to restart it a couple of times. This may be because IE starts up a surrogate process that may not shutdown right away or something. But who knows?

It is a little more problematic on Windows 8 because the integrity level part of UAC is always on.

After doing a little research I don't think there is much we can do about this with UAC and protected mode on.

The user can use the get text business to get the text of the first part of the status bar. you could try using cWndInfo(0) to get that text without having to resort to a dll call. It will have to do for those that can't dump protected mode and have to use UAC.

Article ID:   W17557
Filename:   cGetSBText and UAC.txt
File Created: 2017:07:28:13:58:24
Last Updated: 2013:08:09:09:39:30