How can I check if an NTFS drive exists before launching an application. If it’s not present I’d like to display an error message. This is what I’ve got, but I’m no good at scripting.
itunes.bat
IF EXIST g:\
START "C:\Program Files (x86)\itunes" itunes.exe
ELSE
cscript MessageBox.vbs "Plug in the HDD"
MessageBox.vbs
Set objArgs = WScript.Arguments
messageText = objArgs(0)
MsgBox messageText
I would try the following: