USB Unhide vbScript

' --- KON-BOOT USB INSTALLER -------------------------------
' (c) kon-boot.com  
' USB Unhide modified fb.com/ryansolan0
' ----------------------------------------------------------
Dim query 
Dim WMBIObj 
Dim AllDiskDrives 
Dim SingleDiskDrive 
Dim AllLogicalDisks 
Dim SingleLogicalDisk 
Dim AllPartitions 
Dim Partition 
Dim result
Dim textmsg
Dim wshShell
Dim FileObj
Dim Counter

Set WshShell = WScript.CreateObject("WScript.Shell")
set FileObj = CreateObject("Scripting.FileSystemObject")
set wshShell = wscript.createObject("wscript.shell")
Set WMBIObj = GetObject("winmgmts:\\.\root\cimv2")
Set AllDiskDrives = WMBIObj.ExecQuery("SELECT * FROM Win32_DiskDrive where InterfaceType='USB'") ' 
For Each SingleDiskDrive In AllDiskDrives 
 counter = counter + 1
    query = "ASSOCIATORS OF {Win32_DiskDrive.DeviceID='" + SingleDiskDrive.DeviceID + "'} WHERE AssocClass = Win32_DiskDriveToDiskPartition" 
    Set AllPartitions = WMBIObj.ExecQuery(query) 
    For Each Partition In AllPartitions 
        query = "ASSOCIATORS OF {Win32_DiskPartition.DeviceID='" + Partition.DeviceID + "'} WHERE AssocClass = Win32_LogicalDiskToPartition"
        Set AllLogicalDisks = WMBIObj.ExecQuery (query) 
        For Each SingleLogicalDisk In AllLogicalDisks  
   
   textmsg =  "============================================" & VbCr & _ 
      "DeviceID: " & SingleDiskDrive.DeviceID & VbCr & _ 
      "Logical Drive: "  & SingleLogicalDisk.DeviceID & VbCr & _ 
      "Model: " & SingleDiskDrive.Model & VbCr & _ 
      "Manufacturer: " & SingleDiskDrive.Manufacturer & VbCr & _
      "============================================" & VbCr & _ 
      "Running Scripts from the Command Line attrib -s -h -r /s /d " & SingleLogicalDisk.DeviceID & "\*.*" & VbCr & _ 
      "Note, Run Full Scan Eset Antivirus!"
   result = MsgBox(textmsg, vbQuestion + vbOKCancel, "USB")
   
   if result = vbOk Then
            
    WshShell.Run "attrib -s -h -r /s /d "& SingleLogicalDisk.DeviceID & "\*.*" , 0, True    
    MsgBox "Your USB (" & SingleLogicalDisk.DeviceID & ") is ready!", vbInformation + vbOKOnly, "USB"
    WshShell.Run "explorer "& SingleLogicalDisk.DeviceID
    WScript.quit 
   End If
  Next
    Next 
Next 
if counter = 0 Then
 MsgBox "No USB disks detected or unknown error!", vbCritical + vbOkOnly, "USB"
End If

Comments

  1. Play Star Slot Online for Real Money at ViCasino.com NZ gioco digitale gioco digitale m88 m88 774Mohegan Sun Sign In - Konicasino

    ReplyDelete

Post a Comment

Popular posts from this blog

Online Games Port Unofficial (Philippines)

Kerio Control 7.4.2 Modding