24

It's simple programmatically with ShellExecute to specify the properties verb when instructing Windows to open a file, but can this be done from the command line or run box?

Ideally I'd like to do this without an external program or script.

It appears to be possible by calling ShellExecute by using rundll32.exe, but not without the right parameters.

4 Answers 4

8

Quick tool:

You could write a ridiculous script, or you could just use this awesome portable app shared by an SO user in this answer: https://stackoverflow.com/a/27696310/

GeekDrop Props

Github Share

Usage:

GDProps.exe FILEORFOLDERNAME [FILEORFOLDERNAME]...

Example:

e:\Tools\GDProps.exe "c:\users\Corrupt Profile" "c:\Windows" "c:\Program Files(x86)"

^^ about twice a day Windows 10 corrupts a user profile somewhere so I need to go over and change various security permissions in these folders to perform my quick app-repair

2

I've looked into this several times over the years, but never found a solution, but I have a workaround.

I would like to easily edit the EXIF data on image files from the commend line, so I use the following batch script to open Explorer with the file selected:

@echo off

:: OpenLocation.cmd - Opens file or directory location in Explorer

if [%1]==[] (
        explorer /n, /select,"%CD%"
) ELSE (
        explorer /n, /select,"%~f1"
)

:EOF

Then I type Alt+Enter to open the Properties dialogue box. You can use TAB and the arrow keys to navigate it, so you don't need to reach for the mouse.

0

You can use start->run rundll32 with ...

rundll32 shell32.dll,ShellExecute [args]

... but I'm not sure the args you would use to get the properties.

3
  • Jim Barry, MVP for Windows SDK says : Unfortunately ShellExec_RunDLL doesn't provide any way to specify a verb. I can't think of a simple way of doing it either. "Properties" is a "verb" in Windows SDK parlance.
    – GeneQ
    Jul 26, 2009 at 20:21
  • Anybody know what the arguments would be? Jul 26, 2009 at 23:15
  • 4
    There is no arguments that will open the properties via this method.
    – user1931
    Jul 29, 2009 at 2:59
0

Can you use a custom executable instead?

You can code your own in C or VB6, and then build a small executable file,

or you could use the verinfo.exe

http://www.portablefreeware.com/?id=1937

or the filever.exe from microsoft

http://support.microsoft.com/kb/913111

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .