0
I need to edit 2 registry keys in Windows 8.1 but make it in a way to be able to use them in a batch file to be able to use them on more than 1 PC. In the batch file I will have more reg key's that will also make few other changes; but the 2 keys that i need to change are:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient
in here I need to change the value of the "SpecialPollInterval" key from the default to 3600.
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\W32Time\TimeProviders\NtpClient
in here I need to change the value of the "SpecialPollTimeRemaining" key to my NTP server.
Or need some other way to change the default ntp server from cmd and resync it in Win 8.1, that can be added to a batch file.
How I've tried to edit the above keys is like this:
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\W32Time\TimeProviders\NtpClient /v SpecialPollInterval /t REG_DWORD /d 3600 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\W32Time\TimeProviders\NtpClient /v SpecialPollTimeRemaining /t REG_MULTI_SZ /d ntp.server,7c30bcf /f
They complete succesfully but no changes are made, the keys are not created nor edited
Need to add those 2 in the batch file I have made (code so far):
@echo on
bcdedit /set recoveryenabled no
tzutil /s "GTB Standard Time"
reg add HKLM\Software\BrowserChoice /v Enable /t REG_DWORD /d 0 /f
reg add HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 1 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fDenyTSConnections /t REG_DWORD /d 0 /f
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Terminal Server" /v fAllowToGetHelp /t REG_DWORD /d 1 /f
AFAICT, what you're doing there should add or modify the keys. When you run the batch file are you running it "As Administrator"? – Ƭᴇcʜιᴇ007 – 2014-12-08T19:29:49.560
2Missing closing quotation mark
"HKLM\...\NtpClient /v
should be"HKLM\...\NtpClient" /v
in 1 and 2reg add
– JosefZ – 2014-12-08T19:42:12.367Closing due to it being a typo – random – 2016-04-20T12:23:17.490