Asagidaki script ile Windows Registry sinde bir kayidin varligini kontrol edebilirsiniz, bir uygulama paketlerken ihtiyacim olmustu belki sizlerinde ihtiyaci olur.
Set WshNetwork = WScript.CreateObject("WScript.Network")
strComputer = WshNetwork.ComputerName
Const HKEY_CURRENT_USER = &H80000001
Set oReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "Software\Ornek\"
strValueName = "OrnekObje"
oReg.GetStringValue HKEY_CURRENT_USER,strKeyPath,strValueName,strValue
Wscript.Echo "Ornek deger: " & strValue
Ornegin degerin istediginiz degere esit olup olmadigini asagidaki gibi cok basit bir ekleme ile kontrol edebilirsiniz.
if strValue = 1 then
Wscript.echo "Aktif"
else
wscript.echo "Pasif"
end if
Showing posts with label Registry. Show all posts
Showing posts with label Registry. Show all posts
Sunday, 17 July 2011
Tuesday, 22 February 2011
If you have a server with multiple NICs and if it is consisting to register it's IP address to DNS server even while you uncheck the "register this connection's addresses in DNS" option, I recommend you to create the registry entry below
Create a DWORD named DisableDynamicUpdate under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters and assign value 1 .
Or you can run the command below to easily create the record.
Normally this method shown for 2000 and 2003 servers in MS pages, but it is also working for 2008.
Create a DWORD named DisableDynamicUpdate under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters and assign value 1 .
Or you can run the command below to easily create the record.
reg add HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters /v DisableDynamicUpdate /t REG_DWORD /d 1 /f
Normally this method shown for 2000 and 2003 servers in MS pages, but it is also working for 2008.
Subscribe to:
Posts (Atom)