Sign in to follow this  
Followers 0
shata

I Need Help In This Code

4 posts in this topic

Hi All I'm A Noob In Forum

How I Can Change My Time Internet To This Select By Code

Posted Image

Share this post


Link to post
Share on other sites



Hi, shata. There are several registry keys that handle the windows time. I would suggest opening your registry and doing a Find for time.nist.gov, making note of the registry keys. Then, have a look at RegWrite in the help file.


√-1 2^3 ∑ π, and it was delicious!

Share this post


Link to post
Share on other sites

#3 ·  Posted (edited)

For some odd reason this writes to an entirely diffrent key for me... but its the value i need to edit atleast on windows 7 ultimate 64.

it seems to edit, HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionDateTimeServers.

No idea why it does this ;)

$i=0
$done=0
Do
   $i=$i+1
   $read=_RegRead($i)
   If $read = "time.nist.gov" Then
   _RegWrite("", $i)
$done=1
   EndIf
Until $done=1

Func _RegRead($Key)
$Read=RegRead("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionDateTimeServers", $Key)
Return $Read
EndFunc

Func _RegWrite($Key, $Value)
RegWrite("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionDateTimeServers", $Key, "REG_SZ", $Value)
EndFunc
Edited by AdamSwe

Share this post


Link to post
Share on other sites

Hi, shata. There are several registry keys that handle the windows time. I would suggest opening your registry and doing a Find for time.nist.gov, making note of the registry keys. Then, have a look at RegWrite in the help file.

Thanks man I Like Your Post

For some odd reason this writes to an entirely diffrent key for me... but its the value i need to edit atleast on windows 7 ultimate 64.

it seems to edit, HKEY_LOCAL_MACHINESOFTWAREWow6432NodeMicrosoftWindowsCurrentVersionDateTimeServers.

No idea why it does this ;)

$i=0
$done=0
Do
   $i=$i+1
   $read=_RegRead($i)
   If $read = "time.nist.gov" Then
   _RegWrite("", $i)
$done=1
   EndIf
Until $done=1

Func _RegRead($Key)
$Read=RegRead("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionDateTimeServers", $Key)
Return $Read
EndFunc

Func _RegWrite($Key, $Value)
RegWrite("HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionDateTimeServers", $Key, "REG_SZ", $Value)
EndFunc

Thank You A lot man It's Work With Me

Share this post


Link to post
Share on other sites

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
Sign in to follow this  
Followers 0