humbletech99 Posted April 30, 2008 Report Share Posted April 30, 2008 Does anyone know of a way to get the file/folder properties page from a cmd prompt as though you have just gone and right-clicked the file/folder in the gui?The reason I ask is because I may have a user logged in and need to look at the file/folder properties (specifically the ntfs permissions) and because they are logged in as a user account and have no access to the folder they cannot even see the security tab of the properties box.So I need a way from the command prompt to open the properties box of a file/folder (as I have done a runas to get an admin prompt inside their user gui session). Looking at security settings in a cmd program may also be of some interest if anyone knows that either... Quote Link to comment Share on other sites More sharing options...
homecomputeraid Posted May 1, 2008 Report Share Posted May 1, 2008 Many options are avialable for the Directory command. Go to a command prompt, Start, Run, cmd, Enter, and type dir /?C:\>dir /?Displays a list of files and subdirectories in a directory.DIR [drive:][path][filename] [/A[[:]attributes]] [/B] [/C] [/D] [/L] [/N] [/O[[:]sortorder]] [/P] [/Q] [/S] [/T[[:]timefield]] [/W] [/X] [/4] [drive:][path][filename] Specifies drive, directory, and/or files to list. /A Displays files with specified attributes. attributes D Directories R Read-only files H Hidden files A Files ready for archiving S System files - Prefix meaning not /B Uses bare format (no heading information or summary). /C Display the thousand separator in file sizes. This is the default. Use /-C to disable display of separator. /D Same as wide but files are list sorted by column. /L Uses lowercase. /N New long list format where filenames are on the far right. /O List by files in sorted order. sortorder N By name (alphabetic) S By size (smallest first) E By extension (alphabetic) D By date/time (oldest first) G Group directories first - Prefix to reverse order /P Pauses after each screenful of information. /Q Display the owner of the file. /S Displays files in specified directory and all subdirectories. /T Controls which time field displayed or used for sorting timefield C Creation A Last Access W Last Written /W Uses wide list format. /X This displays the short names generated for non-8dot3 file names. The format is that of /N with the short name inserted before the long name. If no short name is present, blanks are displayed in its place. /4 Displays four-digit yearsSwitches may be preset in the DIRCMD environment variable. Overridepreset switches by prefixing any switch with - (hyphen)--for example, /-W.C:\>/A and /Q sound closest, but may not be enough for your needs.You could also download Windows Power Shell from Microsoft for free and see if that gives you what you want:http://www.microsoft.com/windowsserver2003...l/download.mspx Quote Link to comment Share on other sites More sharing options...
homecomputeraid Posted May 1, 2008 Report Share Posted May 1, 2008 The attrib command also looks promising:Microsoft Windows XP [Version 5.1.2600](C) Copyright 1985-2001 Microsoft Corp.C:\Documents and Settings\tleroy.LSISOLUTIONS>attrib /?Displays or changes file attributes.ATTRIB [+R | -R] [+A | -A ] [+S | -S] [+H | -H] [drive:][path][filename] [/S [/D]] + Sets an attribute. - Clears an attribute. R Read-only file attribute. A Archive file attribute. S System file attribute. H Hidden file attribute. [drive:][path][filename] Specifies a file or files for attrib to process. /S Processes matching files in the current folder and all subfolders. /D Processes folders as well.C:\Documents and Settings\tleroy.LSISOLUTIONS> Quote Link to comment Share on other sites More sharing options...
humbletech99 Posted May 1, 2008 Author Report Share Posted May 1, 2008 I think dir and attrib predate ntfs permissions?At the very least they don't seem to support showing you the ntfs acls on files/folders. Attrib deals with file attributes like hidden or system flags rather than file security privileges like user and group information.I'm also really curious as to whether it's possible to open from cmd the graphical file properties box. Quote Link to comment Share on other sites More sharing options...
Scarecrow Man Posted May 1, 2008 Report Share Posted May 1, 2008 What about cacls?Remember: the dos prompt is very basic and cannot perform many functions on its own. You may need to use a third party program or script rather than a command. Quote Link to comment Share on other sites More sharing options...
humbletech99 Posted May 2, 2008 Author Report Share Posted May 2, 2008 I've used cacls and this is ok, you can see the permissions.I'd really like to know how to fire up the gui though, I can do this for most gui things but not figured this bit out, something about running a shell dll.... Quote Link to comment Share on other sites More sharing options...
Scarecrow Man Posted May 2, 2008 Report Share Posted May 2, 2008 Here's a few things you can do with rundll, but I did not see any about file properties.http://www.dx21.com/SCRIPTING/RUNDLL32/REFGUIDE.ASP?P=A Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.