7Sep/090
Trying to prevent lab users from forgetting their USB jump drives
One of the things I do at work is manage some university computer labs. Our student workers keep an eye on things, and noticed an increasing number of people were walking away leaving their USB jump drives still plugged into the computer. (It seems like most students call them a "USB" now, which to me is the same thing as calling a firewire hard drive a "firewire," but I digress...)
Anyway, I Googled around a bit, and wrote some VBscript code to add to our logout script to try to detect USB drives. It works pretty well, since we've had a huge reduction of lost drives piling up in our lost and found drawer since the script was put in place.
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Drives = FSO.Drives
strMessage = "Please unplug your USB Drive!" & vbcr & vbcr & "Please unplug your USB Drive!" & vbcr & vbcr & "Please unplug your USB Drive!" _
& vbcr & vbcr & "DO NOT FORGET!"
For Each DiskDrive In Drives
If DiskDrive.DriveType = "1" Then
If DiskDrive.IsReady = "True" Then
strMbox = MsgBox(strMessage ,48,"Unplug USB Drive")
End If
End If
Next
Set FSO = CreateObject("Scripting.FileSystemObject")
Set Drives = FSO.Drives
strMessage = "Please unplug your USB Drive!" & vbcr & vbcr & "Please unplug your USB Drive!" & vbcr & vbcr & "Please unplug your USB Drive!" _
& vbcr & vbcr & "DO NOT FORGET!"
For Each DiskDrive In Drives
If DiskDrive.DriveType = "1" Then
If DiskDrive.IsReady = "True" Then
strMbox = MsgBox(strMessage ,48,"Unplug USB Drive")
End If
End If
Next