Using a script that reads registry-- HELP?

Saturday, August 26, 2006 by sViz | Discussion: DesktopX

Sub object_OnTimer123

od = now()
Set oShell = CreateObject("WScript.Shell")
atb = "HKEY_LOCAL_MACHINE\System\CurrentControlSet\" & "Control\TimeZoneInformation\ActiveTimeBias"
offsetMin = oShell.RegRead(atb)
nd = dateadd("n", offsetMin, od)

object.text= "Now: " & (od) & " GMT: " & (nd)

End sub

The script above reads the registry and finds the difference between system time and GreenwichMeanTime. If you put it into a text object you'll see the information it provides. It is very efficient in setting different time zones for my latest widget here: --LINK--

As you may read in the thread in the link, one user had some security issues when using my widget.

I pretty sure the aforementioned code may be the source of the problem but I'm not sure how. Does anyone with experience and better knowledge of scripting know if the code above can cause such security concerns? If so, how can I fix it? Thanks.
ZubaZ
Reply #1 Sunday, August 27, 2006 10:36 AM
I've heard of different security apps preventing registry reading and writing. If I were placing bets I'd start checking there.
SirSmiley
Reply #2 Sunday, August 27, 2006 5:04 PM
If it's on a computer that's administered by someone else & the user is limited access. Then the Local Machine settings obviously can't be written. Have you tried to see if the User settings allow time related registry entries or not?
sViz
Reply #3 Sunday, August 27, 2006 7:48 PM
Thanks for the replies.

I've tested the object on a computer that had the same security application as the one the user had problems with. There's no way to stop the security pop up from happening but I've modified the script so that it only causes a popup on start up. If you click 'allow entire script to run' then the pop up goes away and will not bother you again until the next time you load up the widget.


If it's on a computer that's administered by someone else & the user is limited access. Then the Local Machine settings obviously can't be written. Have you tried to see if the User settings allow time related registry entries or not?


I never thought about non-administrator accounts not being able to access the registry. That's something I'll have to look into.

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01