New Mexico Mark
(Hey THIS is FUN)
2002-10-11 05:24 PM
Determine file system type w/o WMI

We have some legacy NT systems that are still running with FAT c: partitions. We will be touching all our systems in the next few weeks with some general security changes, and I want to run Convert.exe on those systems, but only if they are FAT. They may or may not have WMI extensions installed.

Is there a straightforward way determine file system type from a script without WMI?

Thanks,

NMM


LonkeroAdministrator
(KiX Master Guru)
2002-10-11 05:30 PM
Re: Determine file system type w/o WMI

sure... well, should be.
just a sec.


Sealeopard
(KiX Master)
2002-10-11 05:36 PM
Re: Determine file system type w/o WMI

The first line of CHKDSK contains the file system. You could then use e.g. WSHPipe to get the results into KIXtart.

New Mexico Mark
(Hey THIS is FUN)
2002-10-11 05:45 PM
Re: Determine file system type w/o WMI

Thanks. That would work, but I'm looking for a little less time consuming method, as chkdsk takes a while to run, even in read-only mode. (I know... picky, picky.)

Let me poke around in the resource kit to see if there is a utility there. If you have another ace up your sleeve, though, I'm interested. [Smile]

Mark


LonkeroAdministrator
(KiX Master Guru)
2002-10-11 05:47 PM
Re: Determine file system type w/o WMI

filesystem... windows3.1 compliant...

can't test, would need a machine which such systemdisk.


LonkeroAdministrator
(KiX Master Guru)
2002-10-11 05:52 PM
Re: Determine file system type w/o WMI

mark, check convert.
it seems good enough [Razz]

if you write on commandpromt:
convert %systemdrive% /fs:NTFS

it says: "drive c: already is NTFS"

so, making it:
convert %systemdrive% /fs:NTFS >NUL

you can call it whenever you want and as many times you want.
and, it's not WMI [Wink]
 


New Mexico Mark
(Hey THIS is FUN)
2002-10-11 05:54 PM
Re: Determine file system type w/o WMI

Hey, the simplest solutions are the best. Sounds great.

FWIW, srvinfo.exe from the 2K resource kit returns a slew of good information that could be piped into a KIX script.

Thanks all!

Mark


Waltz
(Seasoned Scripter)
2002-10-11 06:04 PM
Re: Determine file system type w/o WMI

win xp prof utility?

fsutil fsinfo [volumeinfo] RootPathname


LonkeroAdministrator
(KiX Master Guru)
2002-10-11 06:05 PM
Re: Determine file system type w/o WMI

waltz, does that support remote?

Waltz
(Seasoned Scripter)
2002-10-11 06:08 PM
Re: Determine file system type w/o WMI

dunno, haven't used it, just found a reference to it here --- FSUTIL

LonkeroAdministrator
(KiX Master Guru)
2002-10-11 06:11 PM
Re: Determine file system type w/o WMI

it seems that it might, but no info given there...
also, if it does, does it need the remote computer to support wmi etc...


Waltz
(Seasoned Scripter)
2002-10-11 06:15 PM
Re: Determine file system type w/o WMI

It's fast and does work remotely - I tested on a wmi enabled remote machine on both an NTFS and a FAT drive.

To do: test on a non-wmi enabled machine

FYI...
I mapped X: to the remote machine and entered ' fsutil fsinfo volumeinfo x:\ ' at the dos command line.

[ 11. October 2002, 19:32: Message edited by: Waltz ]


LonkeroAdministrator
(KiX Master Guru)
2002-10-11 07:35 PM
Re: Determine file system type w/o WMI

mmm... still, it is dos tool...

quess the convert itself is the best.
it can be run from logonscript and it sets the @error for information collection so no dos pipes needed.


Waltz
(Seasoned Scripter)
2002-10-11 07:50 PM
Re: Determine file system type w/o WMI

six of one, half-dozen of the other?
not that it matters, but aren't we both parsing a returned string from a dos command?


LonkeroAdministrator
(KiX Master Guru)
2002-10-11 08:31 PM
Re: Determine file system type w/o WMI

nope.
with convert all you need to do (no installs, no tools):
shell "%comspec% /C convert %systemdrive% /fs:NTFS >nul"

then if you want to create somekind of check info:
shell "%comspec% /C convert %systemdrive% /fs:NTFS >nul"
if @error=4 "already ntfs" endif

no parsing [Wink]


MCA
(KiX Supporter)
2002-12-05 02:51 PM
Re: Determine file system type w/o WMI

Dear,

Another way is by using our script disksize.zip, which you can find on our site.

Related topic KIX-SCRIPT: how to determine your local disk configuration (fe. HPFS,NTFS,FAT) + size
greetings.