Jump to content

Recommended Posts

Posted

What are you guys using in your VBScripts that are installing off of the cdrom? In the batch files im using the "FOR %%d IN...." command. Need something that looks for the WIN51 file in the root of the cdrom to use as an installation variable.

Thanks!


Posted

Many ways to do that...

Set FSO = CreateObject("Scripting.FileSystemObject")
Set AllDrives = FSO.Drives

For Each Drive In AllDrives

   If Drive.DriveType = "4" Then

       If FSO.FileExists(Drive & "\WIN51") Then
           CDROM = Drive
           Exit For
       End If

   End If

Next

If Len(CDROM) = 0 Then WScript.Quit

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...