Posts Tagged ‘FileScriptingObject’

Problem reading DateLastModified of file in root of C: by non-admin User on Win7

Friday, July 8th, 2011

Create a file, c:\test.txt using administrative rights on Windows 7. Add any data and save
Change modification stamp by editing it and saving

Run this vbscript:
set fso = CreateObject(“Scripting.FileSystemObject”)
logfile = “c:\test.txt”
Set f = fso.GetFile(Logfile)
dModifiedTime = f.DateLastModified
wscript.echo dModifiedTime

I found that the above works for admin user, but returns file creation time or an error for non admin user.  This is odd because user’s have read permissions to files in this folder.

USB Monitor for Removable Drives

Wednesday, April 7th, 2010

Having users plug USB drives into their systems can be a portal for malware into your network and data exiting from your network.  There are sophisticated programs that allow you to block and monitor endpoint security, such as Lumension’s Sanctuary.  If you don’t have that in your budget, you can still monitor and detect insertion of USB drives onto your computers.  USBMonitor.vbs is a highly configurable script that can send you email alerts when a user inserts a drive.  The alert will have the user’s name, the device they inserted and the time it happened.  The script can also generate an annoying beep that persists as long as the drive is inserted.  Users get a pop-up window with a message telling them to remove the drive.  You can permit certain devices to be used by all users, by all users at a certain workstation, or by a single user.  This way you can say that Bob can use a camera, or all users may use an approved IronKey.

Email is sent to the administrator via SMTP.  Take time to read the comments, which should guide you to the required edits for this to work in your environment.   Version 4 (4/7/10) adds options for exiting the program for servers and administrators, and reporting if endpoint security software is working.  It also can dismount the drive using the freeware USB Disk Ejector program, which may be downloaded here:  If you need assistance implementing this in your environment, send me an email.

Tags: USB+Monitor