Tim Golden wrote:
Tim Roberts wrote:
What *I* said was that it could NOT be done in pure Python, but I was
expecting Mark Hammond or Tim Golden to contradict me in such a
pessimistic statement. ;)
I was trying to hold back from a tirade of pointing
out how foolish an idea this was. Why is
How do I get the volume serial number for a drive? For example in the
cmd prompt issuing this:
C:\vol C:
Volume in drive C is LABEL
Volume Serial Number is -
Is the volume serial number wrapped by pywin32? I found the function
win32api.GetVolumeInformation, but it doesn't seem
only way I know how to do it is
import os
out = os.popen(dir SomethingThatDoesntExist)
print out
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Rickey, Kyle W
Sent: Friday, May 16, 2008 11:36 AM
To: python-win32@python.org
Subject:
That's not the serial number of the drive- as assigned by the drive
manufacturer.
If you want the SN from the drive manufacturer, you will need to issue an
IOCTL ATA Passthrough command which sends the ATA Identify Device command
to the drive. Unless the Winapi has a wrapper for that
Rickey, Kyle W wrote:
How do I get the volume serial number for a drive? For example in the
cmd prompt issuing this:
C:\vol C:
Volume in drive C is LABEL
Volume Serial Number is -
Is the volume serial number wrapped by pywin32? I found the function
Message: 5
Date: Fri, 16 May 2008 10:35:45 -0500
From: Rickey, Kyle W [EMAIL PROTECTED]
Subject: [python-win32] Volume Serial Number
To: python-win32@python.org
Message-ID:
[EMAIL PROTECTED]
Content-Type: text/plain; charset=us-ascii
How do I get the volume serial number for a
Trent Nelson wrote:
I'm debugging a weird/sporadic COM/ActiveX error with an application on a
client's site that's recently been 'migrated' to Citrix Metaframe on Windows
2000 Server. I'm starting to think we may be hitting the system-wide limit for
how many HANDLEs can be created across all
Tony Cappellini wrote:
How do I get the volume serial number for a drive? For example
in the
cmd prompt issuing this:
It looks like Tim Golden has a way to do what you want- via Python!
http://tgolden.sc.sabren.com/python/win32_how_do_i/see_if_two_files_are_the_same_file.html
Tim
Tim Golden wrote:
div class=moz-text-flowed style=font-family: -moz-fixedSorry,
missed this one going through. Looks like
Roger's hit the nail on the head, though. Bizarre
behaviour by the IShellLink interface: I can't find
any kind of reference to this but I assume that
since the Path
Rickey, Kyle W wrote:
How do I get the volume serial number for a drive? For example in the
cmd prompt issuing this:
WMI to the rescue?
code
import wmi
for volume in wmi.WMI ().Win32_LogicalDisk ():
print volume.Caption, =, volume.VolumeSerialNumber
/code
TJG
Thanks to all for your responses.
I tried both methods from each Tim. :)
Yes, actually, it does. The second item in the tuple it returns is
the
VSN as a 32-bit binary value.
Ahh, now I understand where I messed up, your code example enlightened
me.
WMI to the rescue?
code
import wmi
I've been enjoying a lot of the WMI examples posted on this mailing
list.
Does anyone know if WMI is ever fully or partially disabled by corporate
customers, eg. as a way to secure workstations?
I'm trying to figure out how confident one can be about assuming WMI
functionality will be available
Tim Golden has a way to do just about everything, but this particular
snippet has nothing to do with the original question.
def get_unique_id (hFile):
(
attributes,
created_at, accessed_at, written_at,
volume,
file_hi, file_lo,
n_links,
index_hi, index_lo
) =
Tony Cappellini wrote:
Tim Golden has a way to do just about everything, but this particular
snippet has nothing to do with the original question.
def get_unique_id (hFile):
(
attributes,
created_at, accessed_at, written_at,
volume,
file_hi, file_lo,
n_links,
[EMAIL PROTECTED] wrote:
I've been enjoying a lot of the WMI examples posted on this mailing
list.
Does anyone know if WMI is ever fully or partially disabled by corporate
customers, eg. as a way to secure workstations?
I would expect quite the opposite. In corporate situations, WMI is
15 matches
Mail list logo