BobAchgill said:
So you are saying that my syntax was exactly correct but I need to these
prerequisites ...???
The syntax is correct and doesn't cause an Win32 Exception here. I
would not say that the code will only working on WinXP SP2, it was the
only system I tried that. Maybe it would be easier, if you tell us,
what is your system configuration, where you get the Exception.
Normally the code shouldn't throw an Win32 Exception, only an
NullReference Exception, when the Value didn't exists. Maybe better,
if you use a default value:
MsgBox("DisableAutoDaylightTimeSet = " &
Registry.LocalMachine.OpenSubKey( _
"SYSTEM\CurrentControlSet\Control\TimeZoneInformation" _
).GetValue("DisableAutoDaylightTimeSet", 0).ToString)
Works for me.
Thorsten Doerfler