İçeriğe geç

Yararlı .Bat ve .Vbs .Reg Kodları – 3

1-

Sağ Tuşa Sahipliği Göster (.bat Kodu)

Ekleme

@Echo Off
Reg.exe add “HKCR\*\shell\Owner” /v “MUIVerb” /t REG_SZ /d “Sahipligi Goster” /f
Reg.exe add “HKCR\*\shell\Owner” /v “Icon” /t REG_SZ /d “imageres.dll,-1029” /f
Reg.exe add “HKCR\*\shell\Owner\command” /ve /t REG_SZ /d “powershell -NoExit Get-ACL ‘%%1’| Format-List -Property Owner” /f
Reg.exe add “HKCR\Directory\shell\Owner” /v “MUIVerb” /t REG_SZ /d “Sahipligi Goster” /f
Reg.exe add “HKCR\Directory\shell\Owner” /v “Icon” /t REG_SZ /d “imageres.dll,-1029” /f
Reg.exe add “HKCR\Directory\shell\Owner\command” /ve /t REG_SZ /d “powershell -NoExit Get-ACL ‘%%1’| Format-List -Property Owner” /f
Reg.exe add “HKCR\Drive\shell\Owner” /v “MUIVerb” /t REG_SZ /d “Sahipligi Goster” /f
Reg.exe add “HKCR\Drive\shell\Owner” /v “Icon” /t REG_SZ /d “imageres.dll,-1029” /f
Reg.exe add “HKCR\Drive\shell\Owner\command” /ve /t REG_SZ /d “powershell -NoExit Get-ACL ‘%%1’| Format-List -Property Owner” /f
Exit

Kaldirma

@Echo Off
Reg.exe delete “HKCR\*\shell\Owner” /f
Reg.exe delete “HKCR\Directory\shell\Owner” /f
Reg.exe delete “HKCR\Drive\shell\Owner” /f
Exit
Sağ Tuşa Sahipliği Göster (.reg Kodu)

Ekle

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\*\shell\Owner]
“MUIVerb”=”Sahipliği Göster”
“Icon”=”imageres.dll,-1029″

[HKEY_CLASSES_ROOT\*\shell\Owner\command]
@=”powershell -NoExit Get-ACL ‘%1’| Format-List -Property Owner”

[HKEY_CLASSES_ROOT\Directory\shell\Owner]
“MUIVerb”=”Sahipliği Göster”
“Icon”=”imageres.dll,-1029″

[HKEY_CLASSES_ROOT\Directory\shell\Owner\command]
@=”powershell -NoExit Get-ACL ‘%1’| Format-List -Property Owner”

[HKEY_CLASSES_ROOT\Drive\shell\Owner]
“MUIVerb”=”Sahipliği Göster”
“Icon”=”imageres.dll,-1029″

[HKEY_CLASSES_ROOT\Drive\shell\Owner\command]
@=”powershell -NoExit Get-ACL ‘%1’| Format-List -Property Owner”
Sağ Tuşa Sahipliği Göster (.reg Kodu)

Kaldir

Windows Registry Editor Version 5.00

[-HKEY_CLASSES_ROOT\*\shell\Owner]

[-HKEY_CLASSES_ROOT\Directory\shell\Owner]

[-HKEY_CLASSES_ROOT\Drive\shell\Owner]

 

2-

W10 Arka Plan Uygulamalarını Aç (.bat kodu)

@Echo Off
Reg.exe add “HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications” /v “GlobalUserDisabled” /t REG_DWORD /d “0” /f
Pause

W10 Arka Plan Uygulamalarını Kapat (.bat kodu)

@Echo Off
Reg.exe add “HKCU\Software\Microsoft\Windows\CurrentVersion\BackgroundAccessApplications” /v “GlobalUserDisabled” /t REG_DWORD /d “1” /f
Exit

 

3-

Sağ Click Sistem Araçları Eklentisi (.bat Kodu)

Ekle

@Echo Off
Reg.exe add “HKCR\DesktopBackground\Shell\SystemTolls” /v “MUIVerb” /t REG_SZ /d “System tools” /f
Reg.exe add “HKCR\DesktopBackground\Shell\SystemTolls” /v “SubCommands” /t REG_SZ /d “Computer;ControlPanel;CMD;GodMode;Regedit;MSCONFIG;appwiz.cpl;Devices;DiskCleanup;DiskDefragmenter;services.msc;UserAccountControlSettings;SnippingTool;StikyNot;SystemInformation;SystemRestore;TaskScheduler;WindowsEasyTransferReports;WindowsEasyTransfer” /f
Reg.exe add “HKCR\DesktopBackground\Shell\SystemTolls” /v “icon” /t REG_SZ /d “imageres.dll,-149” /f
Reg.exe delete “HKCR\DesktopBackground\Shell\SystemTolls” /v “Position” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Computer” /ve /t REG_SZ /d “Computer” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Computer” /v “icon” /t REG_SZ /d “imageres.dll,-109” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Computer\command” /ve /t REG_SZ /d “explorer.exe /e,::{20D04FE0-3AEA-1069-A2D8-08002B30309D}” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ControlPanel” /ve /t REG_SZ /d “Control Panel” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ControlPanel” /v “icon” /t REG_SZ /d “control.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ControlPanel\command” /ve /t REG_SZ /d “control.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DiskCleanup” /ve /t REG_SZ /d “Disk Cleanup” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DiskCleanup” /v “icon” /t REG_SZ /d “cleanmgr.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DiskCleanup\command” /ve /t REG_SZ /d “cleanmgr.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DiskDefragmenter” /ve /t REG_SZ /d “Disk Defragmentation” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DiskDefragmenter” /v “icon” /t REG_SZ /d “dfrgui.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DiskDefragmenter\command” /ve /t REG_SZ /d “dfrgui.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\services.msc” /ve /t REG_SZ /d “Services” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\services.msc” /v “icon” /t REG_SZ /d “MMC.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\services.msc\command” /ve /t REG_SZ /d “MMC.exe services.msc” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\UserAccountControlSettings” /ve /t REG_SZ /d “User Account Control UAC” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\UserAccountControlSettings” /v “icon” /t REG_SZ /d “UserAccountControlSettings.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\UserAccountControlSettings\command” /ve /t REG_SZ /d “UserAccountControlSettings.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SnippingTool” /ve /t REG_SZ /d “Take Screenshot” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SnippingTool” /v “icon” /t REG_SZ /d “SnippingTool.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SnippingTool\command” /ve /t REG_SZ /d “SnippingTool.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\StikyNot” /ve /t REG_SZ /d “Take Note” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\StikyNot” /v “icon” /t REG_SZ /d “StikyNot.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\StikyNot\command” /ve /t REG_SZ /d “StikyNot.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cmd” /ve /t REG_SZ /d “Command Prompt” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cmd” /v “Icon” /t REG_SZ /d “CMD.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cmd\command” /ve /t REG_SZ /d “cmd.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\GodMode” /v “Icon” /t REG_EXPAND_SZ /d “control.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\GodMode” /ve /t REG_EXPAND_SZ /d “Godmode” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\GodMode\command” /ve /t REG_SZ /d “explorer shell:::{ED7BA470-8E54-465E-825C-99712043E01C}” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Regedit” /ve /t REG_SZ /d “Registry” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Regedit” /v “Icon” /t REG_SZ /d “regedit.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Regedit\command” /ve /t REG_SZ /d “%%SYSTEMROOT%%\regedit.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Regedit\command” /ve /t REG_EXPAND_SZ /d “%%SystemRoot%%\regedit.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\msconfig” /ve /t REG_SZ /d “Startup Manager” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\msconfig” /v “Icon” /t REG_SZ /d “msconfig.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\msconfig\command” /ve /t REG_SZ /d “msconfig.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Devices” /v “Icon” /t REG_SZ /d “DeviceProperties.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Devices” /ve /t REG_EXPAND_SZ /d “Device Manager” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Devices” /v “SuppressionPolicy” /t REG_DWORD /d “1073741884” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Devices\command” /ve /t REG_EXPAND_SZ /d “%%windir%%\system32\mmc.exe /s %%SystemRoot%%\system32\devmgmt.msc /s” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\appwiz.cpl” /ve /t REG_SZ /d “Addremove Program” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\appwiz.cpl” /v “Icon” /t REG_SZ /d “explorer.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\appwiz.cpl\command” /ve /t REG_SZ /d “control.exe appwiz.cpl” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SystemInformation” /ve /t REG_SZ /d “System Information” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SystemInformation” /v “icon” /t REG_SZ /d “msinfo32.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SystemInformation\command” /ve /t REG_SZ /d “msinfo32.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\TaskScheduler” /ve /t REG_SZ /d “Task Scheduler” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\TaskScheduler” /v “icon” /t REG_SZ /d “miguiresource.dll,-600” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\TaskScheduler\command” /ve /t REG_SZ /d “mmc.exe /s taskschd.msc” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WindowsEasyTransferReports” /ve /t REG_SZ /d “Windows Kolay Aktarım Raporları” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WindowsEasyTransferReports” /v “icon” /t REG_SZ /d “imageres.dll,-147” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WindowsEasyTransferReports\command” /ve /t REG_SZ /d “C:\Windows\system32\migwiz\postmig.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WindowsEasyTransfer” /ve /t REG_SZ /d “Windows Easy Transfer Reports” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WindowsEasyTransfer” /v “icon” /t REG_SZ /d “imageres.dll,-147” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WindowsEasyTransfer\command” /ve /t REG_SZ /d “C:\Windows\system32\migwiz\migwiz.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SystemRestore” /ve /t REG_SZ /d “System Restore” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SystemRestore” /v “icon” /t REG_SZ /d “rstrui.exe” /f
Reg.exe add “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SystemRestore\command” /ve /t REG_SZ /d “rstrui.exe” /f
Exit

 

Sağ Click Sistem Araçları Menüsü (.bat Kodu)

Kaldır

@Echo Off
Reg.exe delete “HKCR\DesktopBackground\Shell\SystemTolls” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Computer” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\ControlPanel” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DiskCleanup” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\DiskDefragmenter” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\services.msc” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\UserAccountControlSettings” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SnippingTool” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\StikyNot” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\cmd” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\GodMode” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Regedit” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\msconfig” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\Devices” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\appwiz.cpl” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SystemInformation” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\SystemRestore” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\TaskScheduler” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WindowsEasyTransferReports” /f
Reg.exe delete “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\WindowsEasyTransfer” /f
Exit

 

4- 

Dosya uzantısını yazarak birden farklı dosya sildirme (.bat kodu)

Tek tip Dosya sildirmek için,

@echo off
del /S C:\*.mp3       (<<<Buraya sildirmek istediğiniz dosya uzantısını yazınız>>>)

Birden çok farklı uzantıda dosyaları sildirmek için,

@echo off
FOR %%p IN (C:\) DO FOR %%t IN(*.mp3 *.mp4) DO del /s %%p%%t          (<<< Buraya sildirmek istediğiniz dosya uzantılarını yazınız >>> Örnek : *.mp3 *.mp4* .mp5* .avi .mkv .pdf .html .js .jpg .bmp .exe  vs…)

 

5 – 

CPU (işlemci) Sıcaklığını Ölçme (.bat Kodu)

@echo off
:: BatchGotAdmin
REM –>
>nul 2>&1 “%SYSTEMROOT%\system32\cacls.exe” “%SYSTEMROOT%\system32\config\system”
REM –>
if ‘%errorlevel%’ NEQ ‘0’ (
echo
goto UACPrompt
) else ( goto gotAdmin )
:UACPrompt
echo Set UAC = CreateObject^(“Shell.Application”^) > “%temp%\getadmin.vbs”
echo UAC.ShellExecute “%~s0”, “”, “”, “runas”, 1 >> “%temp%\getadmin.vbs”
“%temp%\getadmin.vbs”
exit /B
:gotAdmin
if exist “%temp%\getadmin.vbs” ( del “%temp%\getadmin.vbs” )
pushd “%CD%”
CD /D “%~dp0”
:: BatchGotAdmin

for /f “skip=1 tokens=2 delims==” %%A in (‘wmic /namespace:\\root\wmi PATH MSAcpi_ThermalZoneTemperature get CurrentTemperature /value’) do set /a “HunDegCel=(%%~A*10)-27315”
echo %HunDegCel:~0,-2%.%HunDegCel:~-2% Degrees Celsius
pause

 

6 – 

Toplam ve Kullanıan Ram Miktarını Görmek (.bat Kodu)

@echo
@echo Toplam Bellek Miktariniz
systeminfo | findstr /C:”Total Physical Memory”
@echo.
@echo Kullanlilan Bellek Miktariniz
systeminfo |find “Available Physical Memory”
@pause >nul

 

7 – 

Bilgisayar Açılış Zamanını Kaydet (.vbs Kodu)

 

Set fso = CreateObject(“Scripting.FileSystemObject”)
Set shl = CreateObject(“WScript.Shell”)

path=”D:\”
exists = fso.FolderExists(path)

if (exists) then
‘Create .bat file
Set objFSO=CreateObject(“Scripting.FileSystemObject”)
outFile=”D:\log.bat”
Set objFile = objFSO.CreateTextFile(outFile,True)
objFile.WriteLine “@echo off”
objFile.WriteLine “echo %date% %time% >> %~dp0\log.txt ”
objFile.WriteLine “exit”
objFile.Close

‘Create .vbs file
Set objFSO=CreateObject(“Scripting.FileSystemObject”)
outFile=”D:\log.vbs”
Set objFile = objFSO.CreateTextFile(outFile,True)
objFile.WriteLine “Set WshShell = CreateObject(“”WScript.Shell””)”
objFile.WriteLine “WshShell.Run chr(34) & “”D:\log.bat”” & Chr(34), 0″
objFile.WriteLine “Set WshShell = Nothing”
objFile.Close

‘copy shortcut to startup folder
Dim FileName
FileName = “log.vbs”
Set shortcut = CreateObject(“WScript.Shell”).CreateShortcut(CreateObject(“WScript.Shell”).SpecialFolders(“Startup”) & + “\” + FileName + “.lnk”)
shortcut.Description = “log.vbs”
shortcut.TargetPath = “D:\log.vbs”
shortcut.Arguments = “”
shortcut.Save

else
WScript.Echo “D:\ dizininiz yok”

end if

DİKKAT !!! Bilgisayarın D:/ bölümünde “log” isminde 3 Adet dosya oluşacaktır. Bunlardan log.txt isimli dosya sizin sistem açılış zamanınızdır. Eğer D:\ bölümünüz yoksa yukarıdaki yolları kendinize göre değistiriniz..(3,8,16,19,27 ve 31. satırlarda D:\ yazanları kendinize göre değiştiriniz.) Eğer gizlemek istersenizde şu şekilde yapabilirsiniz  D:\KaydedilecekKlasörAdı\  şeklinde ayarlayabilirsiniz. veya iç içe iki klasör olacaksa D:\KaydedilecekKlasörAdı\KaydedilecekKlasörAdı

 

8 –

Host Dosyasından Site Yasaklama (.bat Kodu) Siteyi Kendiniz Ekleyin

 

@echo.
@echo.
@echo DIKKAT!!!
@echo.
@echo *** Unutmayiniz Proxy ve VPN kullaniyorsaniz (host yasagi) etki etmeyecektir!
@echo.
@echo *** Guvenlik Sertifikali (https://) sitelerde (host yasagi) ise yaramaz!
@echo.
@echo *** Farkli bir IP girmeyecekseniz varsayilan 127.0.0.1‘dir!
@echo.
@echo.
@pause
@cls
@echo.
@echo.
@set /p IP=Ip Adresi Girin *** [Varsayilan IP 127.0.0.1] *** :
@echo.
@echo off
@set /p SiteAdres=Domain [Yasaklanacak Adres] Girin :
@echo “”
@echo %ip%   %siteadres%>>”%Windir%\system32\drivers\etc\hosts”
Rem DNS Önbelleği Güncelleniyor
ipconfig /flushdns
Rem DNS Önbelleği Güncellendi
@cls
9 –

Host Dosyasından Site Yasaklama (.bat Kodu) Hazırlanmış Dosyayı Ekleme

SET NEWLINE=^& echo.

FIND /C /I %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^127.0.0.1 http://sezer.com>>%WINDIR%\system32\drivers\etc\hosts

FIND /C /I  %WINDIR%\system32\drivers\etc\hosts
IF %ERRORLEVEL% NEQ 0 ECHO %NEWLINE%^127.0.0.1 http://tahmaz.com>>%WINDIR%\system32\drivers\etc\hosts

 

10 – 

Host Dosyasından Site Yasaklama (.vbs Kodu)  Siteyi Kendiniz Ekleyin

Option Explicit
Const strIP = “127.0.0.1” ‘ Eklenecek IP Sabiti
Dim oFso, oYaz, strUrl, oCmd

Set oFso = CreateObject(“Scripting.FileSystemObject”)
Set oYaz = oFso.OpenTextFile(“C:\Windows\system32\drivers\etc\hosts”,8,False,-2)
strUrl = InputBox(“Site Adresini Gir”,”Site Adresini Girin”)
If Len(strUrl) > 0 Then oYaz.WriteLine(vbNewLine & strIP & vbTab & strUrl) ‘ Kayıt Ekleniyor
oYaz.Close
Set oFso = Nothing
Set oYaz = Nothing

Set oCmd = CreateObject(“WScript.Shell”)
oCmd.Run “%comspec% /c ipconfig /flushdns”,0,True ‘ DNS Önbelleği Temizleniyor
Set oCmd = Nothing

MsgBox strUrl &” kaydı Hosts dosyasına eklendi.”

Bir cevap yazın