Click here to Skip to main content
15,916,835 members
Home / Discussions / System Admin
   

System Admin

 
GeneralRe: autorun CD at login Pin
MohammadAmiry18-Aug-05 9:20
MohammadAmiry18-Aug-05 9:20 
GeneralRecursive Mutex and Semaphore Pin
badal_akr16-Aug-05 0:26
badal_akr16-Aug-05 0:26 
GeneralList all drive in command prompt Pin
Mekong River15-Aug-05 22:34
Mekong River15-Aug-05 22:34 
GeneralRe: List all drive in command prompt Pin
Steve S16-Aug-05 22:24
Steve S16-Aug-05 22:24 
GeneralRe: List all drive in command prompt Pin
Vasudevan Deepak Kumar18-Aug-05 2:55
Vasudevan Deepak Kumar18-Aug-05 2:55 
GeneralRe: List all drive in command prompt Pin
Mekong River21-Aug-05 21:23
Mekong River21-Aug-05 21:23 
GeneralRe: List all drive in command prompt Pin
Steve S21-Aug-05 23:26
Steve S21-Aug-05 23:26 
GeneralRe: List all drive in command prompt Pin
Steve S22-Aug-05 0:46
Steve S22-Aug-05 0:46 
If you have WMI installed, you can create a VBS file that contains this;
<------------cut here-------------->
function driveType(x)
if (x = 0) then
driveType = "Unknown"
elseif x = 1 then
driveType = "No root"
elseif x = 2 then
driveType = "Removable(flash/floppy)"
elseif x = 3 then
driveType = "HDD"
elseif x = 4 then
driveType = "Network drive"
elseif x = 5 then
driveType = "DVD/CD"
elseif x = 6 then
driveType = "RAM disk"
end if
end function
strComputer = "."
set wbemSvc = GetObject("winmgmts:\\" & strComputer)
set wbemSet = wbemSvc.InstancesOf("Win32_LogicalDisk")
for each wbemObject in wbemSet
wscript.echo wbemObject.Name & " " & driveType(wbemObject.DriveType)
next
<---------------- cut here--------->


save it as say, driveL.VBS, then create a CMD file that contains

CSCRIPT /NOLOGO driveL.VBS

and run your cmd file. Should give you something like this;

A: Removable(flash/floppy)
C: HDD
D: HDD
E: DVD/CD
G: Removable(flash/floppy)
X: Network drive

although obviously, your drives may vary Smile | :)
Checkout the Win32_LogicalDisk docs in MSDN, and you can see how it all works. Not a huge amount of work to extend it to display things like network paths, but I left you something to do - I'm supposed to be looking for paid work ATM, after all !!


Steve S
Developer for hire!
GeneralRe: List all drive in command prompt Pin
Mekong River22-Aug-05 16:29
Mekong River22-Aug-05 16:29 
GeneralRe: List all drive in command prompt Pin
Steve S22-Aug-05 23:56
Steve S22-Aug-05 23:56 
GeneralRe: List all drive in command prompt Pin
Mekong River23-Aug-05 15:07
Mekong River23-Aug-05 15:07 
Generalwindows explorer command Pin
LiYS14-Aug-05 20:42
LiYS14-Aug-05 20:42 
QuestionWin98 start up disk? Pin
Anonymous14-Aug-05 5:57
Anonymous14-Aug-05 5:57 
AnswerRe: Win98 start up disk? Pin
Eric Goedhart14-Aug-05 6:29
professionalEric Goedhart14-Aug-05 6:29 
GeneralSetting up telnet server on Win2003 Pin
Radoslav Bielik10-Aug-05 6:04
Radoslav Bielik10-Aug-05 6:04 
GeneralRe: Setting up telnet server on Win2003 Pin
code-frog11-Aug-05 9:40
professionalcode-frog11-Aug-05 9:40 
GeneralRegistry key values of scanner and webcam Pin
nripun10-Aug-05 3:36
nripun10-Aug-05 3:36 
GeneralRe: Registry key values of scanner and webcam Pin
code-frog11-Aug-05 9:41
professionalcode-frog11-Aug-05 9:41 
GeneralAssembly Pin
Expert Coming9-Aug-05 16:53
Expert Coming9-Aug-05 16:53 
GeneralRe: Assembly Pin
Mekong River9-Aug-05 21:39
Mekong River9-Aug-05 21:39 
GeneralRe: Assembly Pin
Steve S15-Aug-05 0:25
Steve S15-Aug-05 0:25 
Generaldifferences between palm emulator and GoDB Pin
mijan8-Aug-05 21:42
mijan8-Aug-05 21:42 
GeneralRe: differences between palm emulator and GoDB Pin
Mekong River9-Aug-05 21:44
Mekong River9-Aug-05 21:44 
QuestionInstalling SQL Server 2000 on Windows Server 2003 Pin
David Wulff8-Aug-05 8:19
David Wulff8-Aug-05 8:19 
GeneralRe: Installing SQL Server 2000 on Windows Server 2003 Pin
Mekong River9-Aug-05 22:41
Mekong River9-Aug-05 22:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.