gunsmokingman Posted July 16, 2006 Posted July 16, 2006 This would work at the stage and it check both the Hard drive CD or DVD DriveDim Act : Set Act = CreateObject("Wscript.Shell") Dim Fso : Set Fso = CreateObject("Scripting.FileSystemObject") Dim Cnt, Drv, StrDrv Set Drv = Fso.Drives For Each StrDrv In Drv If StrDrv.DriveType = 4 Or 2 Then If StrDrv.IsReady = True Then If Fso.FileExists(StrDrv & "\AllAppUA.cmd") Then Cnt = 2 Act.Popup "Found The AllAppUa.cmd" & vbCrLf & StrDrv & "\AllAppUA.cmd" , 5, "Found", 0 + 32 Exit For End If End If End If Next If Cnt < 1 Then Act.Popup "Cannot Find The AllAppUa.cmd on the local" & vbCrLf &_ "Hard Drive or CD or DVD drive", 10, "Missing", 0 + 32 End If
MAVERICKS CHOICE Posted July 16, 2006 Posted July 16, 2006 (edited) Quote GSM:This one will check for a specific file on any CD or DVD drive, when the check file is found it will produce a message box that say This is a XP CD then it will quit the script.Change this color in the script to suit your needs.If Fso.FileExists(StrDrv.DriveLetter & ":\win51ip.SP2") Then Dim Drv, Fso, StrDrv Set Fso = CreateObject("Scripting.FileSystemObject") Set Drv = Fso.Drives For Each StrDrv In Drv If StrDrv.DriveType = 4 Then If StrDrv.IsReady = True Then If Fso.FileExists(StrDrv.DriveLetter & ":\win51ip.SP2") Then MsgBox "This is a XP CD : " & StrDrv.DriveLetter, 0 + 32,"Confirm XP CD" Exit For Else MsgBox "This is not a XP CD : " & StrDrv.DriveLetter, 0 + 32,"Missing XP CD" End If End If End If NextIn a typical ua install off the cd/dvd where is this called from?CheersMC. Edited July 16, 2006 by MAVERICKS CHOICE
gunsmokingman Posted July 16, 2006 Posted July 16, 2006 I would assume from the $OEM$ folder from the cmdline.txt, but do not quote me on that.
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now