Yararlı .Bat ve .Vbs .Reg Kodları - 4

Yararlı .Bat ve .Vbs .Reg Kodları - 4

1 -

Açılan Pencerede Siz Yazın Windows Söylesin (.vbs Kodu)

Dim message, sapi
message=InputBox("Konuş Benimle...","Yazarsan Söylerim")
Set sapi=CreateObject("sapi.spvoice")
sapi.Speak message

 

2 - 

CPU Detaylı Bilgi Edinme (.vbs Kodu)

On Error Resume Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_Processor")
For Each objItem in colItems
    Wscript.Echo "Description: " & objItem.Description
    Wscript.Echo "Name: " & objItem.Name
    Wscript.Echo "Processor Id: " & objItem.ProcessorId
    Wscript.Echo "Current Clock Speed: " & objItem.CurrentClockSpeed
    Wscript.Echo "Maximum Clock Speed: " & objItem.MaxClockSpeed
    Wscript.Echo "Socket Designation: " & objItem.SocketDesignation
Next

 

3 - 

Ekran Kartı Boyut ve Modelini Öğren (.vbs Kodu)

On Error Resume Next
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * from Win32_VideoController")
For Each objItem in colItems
MsgBox objItem.Description & " - " & "Ram: " & FormatNumber(objItem.AdapterRAM /1024\1024*-1, 0) & " MB"
Next
Set colItems = Nothing
Set objWMIService = Nothing

 

4 - 

MAC Adresine Bak (.vbs Kodu)

 

Option Explicit

Dim objWMIService, colItems, objItem, Tst
Set objWMIService = GetObject("winmgmts:\\.\root\cimv2")
Set colItems = objWMIService.ExecQuery ("Select * From Win32_NetworkAdapterConfiguration Where IPEnabled = True")
For Each objItem in colItems
  Tst = Tst & vbCRLF & objItem.MACAddress
Next
MsgBox "MAC-Adresiniz: " & Tst, , WScript.ScriptName

 

5 - 

Ram'ler Hakkında Bilgi Edinme (.vbs Kodu)

 

On Error Resume Next

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")

Set colItems = objWMIService.ExecQuery _
    ("Select * from Win32_PhysicalMemoryArray")
For Each objItem in colItems
    Wscript.Echo "Maximum Capacity: " & objItem.MaxCapacity
    Wscript.Echo "Memory Devices: " & objItem.MemoryDevices
Next
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
    & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colSettings = objWMIService.ExecQuery _
    ("Select * from Win32_ComputerSystem")
For Each objComputer in colSettings
    Wscript.Echo "Total Physical Memory: " & _
        objComputer.TotalPhysicalMemory/ 1048576
Next
strComputer = "." ' Local computer
strMemory = ""
i = 1

set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemory")

For Each objItem In colItems

   if strMemory <> "" then strMemory = strMemory & vbcrlf
   strMemory = strMemory &  "Bank" & i & " : " & (objItem.Capacity /1024 /1024) & " Mb"
   i = i + 1
Next
installedModules = i - 1

Set colItems = objWMIService.ExecQuery("Select * from Win32_PhysicalMemoryArray")

For Each objItem in colItems
   totalSlots = objItem.MemoryDevices
Next

wscript.echo "Total Slots: " & totalSlots & vbcrlf & _
        "Free Slots: " & (totalSlots - installedModules) & vbcrlf & _
        vbcrlf & "Installed Modules:" & vbcrlf & strMemory

 

6 - 

Kod ile Web Sitesi Açmak (.bat Kodu)

@echo off
start chrome http://tahmaz.net
start iexplore http://tahmaz.net
start firefox http://tahmaz.net
exit

Yukarıdaki komutlarda hangi tarayıcı ile hangi sayfayı açmak istediğinizi seçebilirsiniz. (Eğer komutu bu şekilde uygularsanız tahmaz.net adresini Chrome,Firefox ve Internet Explorer 'de seri olarak açacaktır.)