Jump to content

Recommended Posts

Posted

I use regina rexx and patrick mcphee's w32util.dll to do this. This code turns on and off the throbber for ie and the explorer, by using registry keys. It reads a key, changes a bit and puts it back.

/* Shell throbber/dethrobber.  The core now works.  */
numeric digits 50

regroot = 'HKEY_CURRENT_USER'
regbase = 'Software\Microsoft\Internet Explorer\Toolbar\'
regword = 'ITBarLayout'

call rxfuncadd 'w32loadfuncs', 'w32util', 'w32loadfuncs'
call w32LoadFuncs
parse arg a1 a2
if pos(a1,'012') = 0 then do
say "THROB.REX non-distructively alters the throbber in IE and the Shell"
say ""
say "the throbber is the little rotating thing in the top right hand corner"
say "of the window"
say "This is to be run under the target system, not in PE boot"; say
say "Usage: THROB shell ie"
say "   0   turn off the throbber"
say "   1   turn on the throbber"
say "   2   just look."; say ""
say "if the throbber is on, then the last hex digit is a letter or over 8"
say "a value of 0 to 7 means it is off".
end
if pos(a1,'012') = 0 then a1 = 2
if pos(a2,'012') = 0 then a2 = 2

/* Shell Browser */
call regpeek 'ShellBrowser', a1
call regpeek 'Explorer', a1
/* IE */
call regpeek 'WebBrowser', a2

exit

regpeek:
parse arg t0, t1
reghere = w32regopenkey(regroot, regbase || t0)
if reghere=0 then do; call w32regclosekey(reghere); return; end;
k1 =  w32regqueryvalue(reghere, regword)
parse var k1 1 k1a 33 k1b 35 k1c
select
 when t1 = 1 then r1 = b2x( bitor(x2b(k1b), '00001000'))
 when t1 = 0 then r1 = b2x(bitand(x2b(k1b), '11110111'))
 when t1 = 2 then r1 = k1b
 otherwise; r1 = k1b; say 'invalid option' t1; end
r0 = w32regqueryvaluetype( reghere, regword)
r2 = k1a || r1 || k1c
s1 = w32regsetvalue(reghere, regword, r0, r2)
if s1=0 then s2 = 'Y'; else s2 = 'N'
call w32regclosekey(reghere)
say t1 left(t0,20) r0 k1b r1 s2
return


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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...