public inbox for cygwin@cygwin.com
 help / color / mirror / Atom feed
From: "DePriest, Jason R." <jrdepriest@ftb.com>
To: cygwin@cygwin.com
Subject: RE: Accessing Property Sheets
Date: Thu, 29 Jul 2004 19:02:00 -0000	[thread overview]
Message-ID: <F67AB1DD14544242BE5BFE94F5939175B7F953@E2KMEMMCS1.ftbco.ftn.com> (raw)

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
> <http://msdn.microsoft.com/library/en-us/shellcc/platform/shell/reference/functions/functions.asp>
> --
> 				http://cs.nyu.edu/~pechtcha/
>       |\      _,,,---,,_		pechtcha@cs.nyu.edu
> ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
>      |,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 file-version-edit.pl \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: 1.26.0.0
Product Version: 1.26.0.0
OS: NT/Win32
Type: Application
Date: 0000000000000000
Language: English (United States)
Comments:
CompanyName: Sysinternals
FileDescription: Sysinternals PsList
FileVersion: 1.26
InternalName: pslist
Copyright: Copyright ⌐ 2000-2004 Mark Russinovich
Trademarks:
OriginalFilename: pslist.exe
ProductName: Sysinternals pslist
ProductVersion: 1.26
PrivateBuild:
SpecialBuild:
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

C:\Tools\Code\projects\file-version>

-Jason

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.

==============================================================================

             reply	other threads:[~2004-07-29 15:23 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-29 19:02 DePriest, Jason R. [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-07-29 10:37 George
2004-07-29 18:47 ` Igor Pechtchanski
2004-07-30  6:53   ` George

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=F67AB1DD14544242BE5BFE94F5939175B7F953@E2KMEMMCS1.ftbco.ftn.com \
    --to=jrdepriest@ftb.com \
    --cc=cygwin@cygwin.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).