Re: find out which partiton

Tech-Archive recommends: Fix windows errors by optimizing your registry

From: Matthias Tacke (Matthias_at_Tacke.de)
Date: 09/12/04


Date: Sun, 12 Sep 2004 04:30:28 +0200


"Randall Flagg" wrote:

>Hi there
>
>i have to find out which partitions do exist on harddisk 0 on a large
>number on computers.
>
>found a way to do it with a script using diskpart unfortunately this
>does not work on Windows NT.
>
>i need the existing drive letters for this partitions on Windows NT
>4.0 SP6 and Windows 2000 / XP...
>
>does anyone know a way to get this info by WSH-Script, shell script or
>a little command line tool?
>
>Thanks in advance
>
Hi Randall,

you could use the Microsoft TechNet: Scriptomatic Tool
http://www.microsoft.com/technet/community/scriptcenter/tools/wmimatic.mspx
to generate a script which gathers information through wmi.
On nt this require the installation of

WMI CORE 1.5 for Windows NT 4.0
http://www.microsoft.com/downloads/release.asp?ReleaseID=18491

IMO the relevant keys are:
scriptomatic.hta(Win32_DiskDrive)
scriptomatic.hta(Win32_DiskPartition)
scriptomatic.hta(Win32_LogicalDisk)

scriptomatic.hta(Win32_OperatingSystem)

In msdn there is a page for win32_Volume but this isn't supported in
scriptomatic and since I'm a wsh newbie I'm stuck here.
http://msdn.microsoft.com/library/en-us/wmisdk/wmi/win32_volume.asp

Based on logical drive/partition sizes you can _guess_ which partition
has what letter assigned. (On my system I've two equally sized disks
with the same partitioning scheme, so I've nothing to distinguish)

Sorry for my previous empty posting, tried to cancel with no success :-)

-- 
Greetings
Matthias


Relevant Pages

  • Re: Running a vbscript during Post Install
    ... I'll go ahead and break the script out into to pieces, ... Will the variables the OSD process creates be avaiable to the vbscript? ... If I run it during the preinstall phase, the partitions are removed, ... Dim objWMIService ...
    (microsoft.public.sms.tools)
  • Format the system volume
    ... I'm working on a script for Windows deployment that is supposed to detect the active partition on the computer's first disk and reformat it (and leave all other partitions alone). ...
    (microsoft.public.scripting.vbscript)
  • Re: Running a vbscript during Post Install
    ... If you start the script as an zti userexit you get access to all ... Johan Arwidmark wrote: ... If I run it during the preinstall phase, the partitions are removed, ... Dim objWMIService ...
    (microsoft.public.sms.tools)
  • Re: Operating System Deployment
    ... Installation" folder. ... ZeroTouchInstallation.vbs script. ... > clear the drive and create new partitions if I put them into the ... >> We provided an example of doing exactly this in the Solution Accelerator ...
    (microsoft.public.sms.tools)
  • find out which partiton
    ... on computers. ... found a way to do it with a script using diskpart unfortunately this does ... i need the existing drive letters for this partitions on Windows NT 4.0 SP6 ...
    (microsoft.public.win2000.cmdprompt.admin)