中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-08-12 11:37
47,811 topics / 349,897 posts / today 0 new / 48,256 members
DOS批处理 & 脚本技术(批处理室) » Question: get the current drive type in VBS
Printable Version  648 / 1
Floor1 lummox Posted 2009-09-01 15:13
初级用户 Posts 14 Credits 28
As the title says.

In similar programs, the disk type is obtained by traversing all drives:

For Each disk In disks
……
Next

My question is:
How can I directly get the disk type?
If current drive type<>1 (if ... then statement) [This is what I'm asking about]
display "The current drive X:\ is not a removable drive; please run this program from a removable drive"
exit the program
end the judgment (End If)
Floor2 qinchun36 Posted 2009-09-01 23:09
高级用户 Posts 400 Credits 609


As for your question:



[ Last edited by qinchun36 on 2009-9-1 at 23:29
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023