Accessing Property Sheets

DePriest, Jason R.
Thu Jul 29 19:02:00 GMT 2004

On Thursday, July 29, 2004 7:31 AM, Igor Pechtchanski wrote

> On Wed, 28 Jul 2004, George wrote:
>> I keep running up against situations where I require access to the
>> property sheet for a folder/file to perform a settings change I can't
>> accomplish otherwise.
> Exactly which properties are you trying to change?  Some of the
> security ones can be changed via setfacl, as well as chmod/chown (I
> don't think either one supports setting inheritable permissions,
> though). 
>> I'm wondering whether Cygwin offers some way I've not yet discovered
>> to display the property sheet dialog for a folder/file.  Seems it
>> would save the trouble of opening an explorer window from bash,
>> selecting a file, opening the context menu by right clicking and
>> then selecting properties (before navigating the various tabs and
>> clicking some more). 
> Not really Cygwin-specific, but look up the Shell API on MSDN [*]
> (which you can invoke via rundll/rundll32), in particular, the
> SHObjectProperties function.
> To put this back on-topic, if you do manage to find a way to do what
> you want that works on all OS's, please consider making a
> cygstart-like utility to do this and contributing it to the Cygwin
> distribution. 
> HTH,
> 	Igor
> [*] One of the possible pointers is
> <>
> --
>       |\      _,,,---,,_
> ZZZzz /,`.-'`'    -.  ;-;;,_
>      |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski, Ph.D.
>     '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!
> "Happiness lies in being privileged to work hard for long hours in
> doing whatever you think is worth doing."  -- Dr. Jubal Harshaw

I have a perl script that I use from a Windows command prompt that does this.

It uses Digest::MD5, Win32::File, Win32::File::VersionInfo, and Win32::FileTime to get as much information as possible.

It won't run under a cygwin prompt because I don't have all of those Win32 modules available, but if you are interested, I can send it to you.

Here is a sample of the output:
C:\Tools\Code\projects\file-version>perl \tools\sysinternals\pslist.exe

File: \tools\sysinternals\pslist.exe
Your file seems to exist.
Win32::File::GetAttrubutes("\tools\sysinternals\pslist.exe",$fattr) -> 32
$finfo = Win32::File::VersionInfo::GetFileVersionInfo("\tools\sysinternals\pslist.exe") -> HASH(0x183f094)
$ftime = Win32::FileTime->new("\tools\sysinternals\pslist.exe") -> Win32::FileTime=HASH(0x18353cc)
File Version:
Product Version:
OS: NT/Win32
Type: Application
Date: 0000000000000000
Language: English (United States)
CompanyName: Sysinternals
FileDescription: Sysinternals PsList
FileVersion: 1.26
InternalName: pslist
Copyright: Copyright ⌐ 2000-2004 Mark Russinovich
OriginalFilename: pslist.exe
ProductName: Sysinternals pslist
ProductVersion: 1.26
File Attributes: archive
Created : 2004/05/31 14:25:04
Accessed : 2004/07/29 10:20:03
Modified : 2004/05/31 14:25:04
MD5 Checksum: 28ad0aaa0190120c65484d8e079daa62



PS - I apologize in advance for the legal disclaimer at the bottom of my email message.  This is tacked on by our SMTP gateway and I have no control over it.

Confidentiality notice:
This e-mail message, including any attachments, may contain legally privileged and/or confidential
information. If you are not the intended recipient(s), or the employee or agent responsible for delivery
of this message to the intended recipient(s), you are hereby notified that any dissemination,
distribution, or copying of this e-mail message is strictly prohibited. If you have received this message
in error, please immediately notify the sender and delete this e-mail message from your computer.


More information about the Cygwin mailing list