Sorry, 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 attribute of the link should *only*
contain an executable, there's no need for the
q
Roger,
Mike
Driscoll wrote:
Hi,
I've had this niggling issue from time to time. I want to create a
shortcut on the user's desktop to a website that specifically loads
Firefox even if Firefox is not the default browser.
I usually use COM as it allows very specific settings of the shortcut,
such
Tim,
Mike
Driscoll wrote:
I've had this niggling issue from time to time. I want to create a
shortcut on the user's desktop to a website that specifically loads
Firefox even if Firefox is not the default browser.
...
shortcut = shell.CreateShortCut(userDesktop + '\\MyShortcut.lnk')
shortcut.Tar
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 it
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: [python-win
Dahlstrom, Roger wrote:
only way I know how to do it is
import os
out = os.popen("dir SomethingThatDoesntExist")
print out
The "vol" command was designed for this purpose:
out = os.popen("vol")
although GetVolumeInformation is a better way.
--
Tim Roberts, [EMAIL PROTECTED]
Providenza &
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 functionalit
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
win32api.GetVolumeInfo
Message: 5
> Date: Fri, 16 May 2008 10:35:45 -0500
> From: "Rickey, Kyle W" <[EMAIL PROTECTED]>
> Subject: [python-win32] Volume Serial Number
> To:
> Message-ID:
><[EMAIL PROTECTED]
> >
> Content-Type: text/plain; charset="us-ascii"
>
> >>How do I get the volume serial number for a drive?
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 Golden wrote:
Sorry,
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 attribute of the link should *only*
contain an executable, there
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?
import wmi
for volume in wmi.WMI ().Win32_LogicalDisk ():
print volume.Caption, "=>", volume.VolumeSerialNumber
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?
>
> 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 o
>>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
) = win32f
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,
index
[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
of
[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'm trying to figure out how confident one can be about assuming WMI
functi
20 matches
Mail list logo