Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Check Path of Executable

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
Is there a script that can be used to check the path of an executable and if it is from the floppy (A or CD-ROM (F then deny the program?

I've locked down the workstations using RestrictRun and a whole bunch of other things but some students have finally figured out that they can rename executables brought from home, or downloaded into the common programs such as "iexplore.exe" (Internet Explorer) and then the program will run.

I have figured out how to delete *.exe in My Documents (calling a batch file from a .vbs so that no window appears) and this is one of the last holes I think needs patching.

Any help or information is appreciated. TIA
bluechipj@hotmail.com
 
BlueChipJ,

This function should let you know what type of drive it is:

' ***********************
Function DriveType(Drv)
' ***********************
Dim Fso, d, t
Set Fso = CreateObject("Scripting.FileSystemObject")
Set d = Fso.GetDrive(Drv)
Select Case d.DriveType
Case 0: t = "Unknown"
Case 1: t = "Removable"
Case 2: t = "Fixed"
Case 3: t = "Network"
Case 4: t = "CD-ROM"
Case 5: t = "RAM Disk"
End Select
DriveType = t
End Function

fengshui_1998
 
Thank you for your reply.

Will this script run from a simple .vbs file? I have tried to run it as that and get no error, or response from it.

How do I implement it into a program that will run on the workstations and monitor program execution?

I have done some researcha and know that I can "send" WM_CLOSE to the applications to close them. How do I put this together?

Again, info and help is greatly appreciated.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top