I found this script at Microsoft TechNet that produces a listing of local partitions and their associated drive letters:
ComputerName = "."
Set wmiServices = GetObject _
("winmgmts:{impersonationLevel=Impersonate}!//" & ComputerName)
Set wmiDiskDrives = wmiServices.ExecQuery _
("SELECT Caption, DeviceID FROM Win32_DiskDrive"

For Each wmiDiskDrive In wmiDiskDrives
WScript.Echo wmiDiskDrive.Caption & " (" & wmiDiskDrive.DeviceID & "

"
strEscapedDeviceID = Replace(wmiDiskDrive.DeviceID, "\", "\\", 1, -1, vbTextCompare)
Set wmiDiskPartitions = wmiServices.ExecQuery _
("ASSOCIATORS OF {Win32_DiskDrive.DeviceID=""" & _
strEscapedDeviceID & """} WHERE AssocClass = Win32_DiskDriveToDiskPartition"

For Each wmiDiskPartition In wmiDiskPartitions
WScript.Echo vbTab & wmiDiskPartition.DeviceID
Set wmiLogicalDisks = wmiServices.ExecQuery _
("ASSOCIATORS OF {Win32_DiskPartition.DeviceID=""" & _
wmiDiskPartition.DeviceID & """} WHERE AssocClass = Win32_LogicalDiskToPartition"

For Each wmiLogicalDisk In wmiLogicalDisks
WScript.Echo vbTab & vbTab & wmiLogicalDisk.DeviceID
Next
Next
Next
A sample of the output (from my local workstation) looks like this:
HITACHI_DK23BA-20B (\\.\PHYSICALDRIVE0)
Disk #0, Partition #0
C:
Disk #0, Partition #1
D:
Disk #0, Partition #2
E:
F:
It's quite handy because it ignores mapped drives, CDs and removable drives.
If you pipe this output to FIND ":" then it will produce a list containing just the drive letters.
You will need to make sure that latest versions of WSH, VBScript and WMI are installed on your systems. You can get more information here:
I saved this script as locldrvs.vbs, then created the following batch file, saving it in the same folder as the vbs file:
cscript locldrvs.vbs | find ":" > locldrvs.txt
del deletemp.log
for /F "eol=; tokens=1 delims=," %%i in (locldrvs.txt) do del %%i\*.tmp /Q /S >> deletemp.log
del locldrvs.txt
The batch file uses the list created in the first line to delete all *.tmp files on your local drives, creates a log file and cleans up it's input file (locldrvs.txt).
I tested it on NT4, Win2K Pro and Win2K Server. The servers use SCSI drives and the workstations use IDE.