I want to first off say, I don't know Visual Basic. I have a XML script that for a program that can only accept VB Scripts. I want a simple script to check whether, on it's own or if it can, from the XML file to see if a USB drive is attached to the computer, if not, the XML file won't run until the USB drive is attached to the computer and only only until the USB drive is attached ? Right now the XML file is set as task schedule to run at a specific day and time, I don't know if the task will execute if the drive is not connected, as it's remained connected for a while.
Siberian
13
Junior Poster
Recommended Answers
Jump to PostI want to first off say, I don't know Visual Basic
What you want to achieve by checking if a USB drive is connected or not, is quite advanced in vb6. You'll be making use of tons of windows API's to check a pluged in device, what kind …
Jump to PostFirst off VB script is only a subset of VB, which may make your job even harder. Second of all in regards to not knowing VB or VB script, no time like the present :)
Jump to PostAll I want is a warning box to tell me the drive is not connected
That is your problem right there. Before you can get to the message, you need the code to check IF it is plugged in, in order to genertae the message. The link I …
Jump to PostIt's even more complicated than that. I just boned up on vbscript and it doesn't appear to support writing to or from files which makes sense since it was designed to interact with web pages. Porbably the only thing you can do is use an error trap that can keep …
Jump to PostTo be honest, I don't think I understand what you asking. Here is my interpretation.
- You have some program that creates a VBScript file.
- This script is to run only if a certain Drive Volume is available.
- If it is not available, you want to prompt the user to mount …
All 21 Replies
AndreRet
526
Senior Poster
Siberian
13
Junior Poster
tinstaafl
1,176
Posting Maven
Siberian
13
Junior Poster
AndreRet
526
Senior Poster
tinstaafl
1,176
Posting Maven
AndreRet
commented:
Nice alternate solution.
+12
Siberian
13
Junior Poster
TnTinMN
418
Practically a Master Poster
Siberian
13
Junior Poster
Siberian
13
Junior Poster
TnTinMN
418
Practically a Master Poster
Siberian
13
Junior Poster
TnTinMN
418
Practically a Master Poster
Siberian
13
Junior Poster
Siberian
13
Junior Poster
Siberian
13
Junior Poster
TnTinMN
418
Practically a Master Poster
Siberian
13
Junior Poster
TnTinMN
418
Practically a Master Poster
Siberian
13
Junior Poster
Siberian
13
Junior Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.