winapiexec
winapiexec copied to clipboard
[❔] Is it possible to use winapiexec to open a specific property sheet of a file ?
Hello @m417z
Is it possible to use winapiexec to open a specific property sheet of a file?
There is a utility called GDProp that opens the standard "Properties Sheet" window for a given file.
GDProp opens the window always positioning on the property sheet General
.
I would like to do something similar but opening an specific property sheet, for example Security
.
🙏Thanks for sharing winapiexec and its code with the community.
Best regards, Claudio Salvio
Hi Claudio,
Here's a simple example:
winapiexec64.exe shell32.dll@SHObjectProperties 0 2 C:\Windows Sharing , u@MessageBoxW 0 "Showing properties..." $$:0 0
This example opens the properties of C:\Windows
with the Sharing tab. Not that the message box is necessary to keep the process running. There might be better solutions, but it requires some extra thought.
Edit: Here's the proper way to do it, and it makes more sense to create a small command line tool for the task: https://devblogs.microsoft.com/oldnewthing/20080528-00/?p=22163
Hi @m417z
Thank you for your prompt reply. The command line worked correctly for me in cmd.exe. In PowerShell it did not work, although I suppose I could launch from there a cmd.exe and get a similar result as previously mentioned.
Unfortunately the requirement to open an extra window (u@MessageBoxW 0 "Showing properties..."
) makes the procedure a bit "ugly".
Thanks for the link to the proper way: Reading a contract from the other side: SHSetInstanceExplorer and SHGetInstanceExplorer - The Old New Thing
Unfortunately my current knowledge of C programming does not justify me trying to approach the task from that side.
I put a feature request on the GDProp GitHub Repo to add a parameter to indicate the tab:
[FR] Add support for additional parameter with the name of the property sheet to display - Issue #4.
At this point, it would seem that that is the most reasonable way to get this functionality, at least for me.
🙏 Thanks for all the helpful programs you share with the community.
Regards, Claudio Salvio
I 💙 Textify
I 💙 7+ Taskbar Numberer
There's a "show-properties.exe <path to file or directory>" here using the proper way:
https://github.com/JosephusPaye/show-properties/blob/master/src/show-properties.cpp