Re: [python-win32] Attaching Menu to Any App

2008-05-16 Thread Larry Bates
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

[python-win32] Volume Serial Number

2008-05-16 Thread Rickey, Kyle W
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

Re: [python-win32] Volume Serial Number

2008-05-16 Thread Dahlstrom, Roger
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:

Re: [python-win32] Volume Serial Number

2008-05-16 Thread Tony Cappellini
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

Re: [python-win32] Volume Serial Number

2008-05-16 Thread Tim Roberts
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

Re: [python-win32] Volume Serial Number

2008-05-16 Thread Tony Cappellini
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

Re: [python-win32] [OT] Anyone happen to know the system-wide limit of HANDLEs in Windows 2000 Server?

2008-05-16 Thread Tim Roberts
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

Re: [python-win32] Volume Serial Number

2008-05-16 Thread Tim Roberts
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

Re: [python-win32] Problem creating a shortcut

2008-05-16 Thread Mike Driscoll
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

Re: [python-win32] Volume Serial Number

2008-05-16 Thread Tim Golden
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

Re: [python-win32] Volume Serial Number [SOLVED]

2008-05-16 Thread Rickey, Kyle W
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

[python-win32] Is WMI ever disabled?

2008-05-16 Thread python
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

Re: [python-win32] Volume Serial Number

2008-05-16 Thread Tony Cappellini
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 ) =

Re: [python-win32] Volume Serial Number

2008-05-16 Thread Tim Roberts
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,

Re: [python-win32] Is WMI ever disabled?

2008-05-16 Thread Tim Roberts
[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