From: mscir on
On 5/24/2010 8:31 AM, ever90321(a)mypacks.net wrote:
> Hello,
> I've done numerous web and usenet searches over the past few days and
> come up short, and am hoping now to get somebody's input...
> I am not a C programmer, but am looking for a registry or command line
> technique, or a small 3rd party command line tool that performs the
> right-click -> Sort By Name feature on the Windows XP Programs menu.
> (Or similarly, the "Taskbar and Start Menu Properties" Control Panel's
> Sort button.) It would obviously be helpful if it worked for newer
> OS's, too. From what I can tell, there is no built-in way to do this,
> without performing additional work like rebooting the computer. I
> also found a VBS script that does an actual (bubble?) sort on the
> shortcuts, which is also something I want to avoid. From using
> SysInternals' Process Monitor, the best I can tell is that the Sort
> functionality is built into explorer.exe, but I have no idea if this
> API call is even exposed for programmers.
> Any suggestions?
> Thanks,
> Todd

This claims it works for XP

http://www.theeldergeek.com/sort_menus_alphabetically.htm





--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: mscir on
On 5/24/2010 8:31 AM, ever90321(a)mypacks.net wrote:
> Hello,
>
> I've done numerous web and usenet searches over the past few days and
> come up short, and am hoping now to get somebody's input...
>
> I am not a C programmer, but am looking for a registry or command line
> technique, or a small 3rd party command line tool that performs the
> right-click -> Sort By Name feature on the Windows XP Programs menu.
> (Or similarly, the "Taskbar and Start Menu Properties" Control Panel's
> Sort button.) It would obviously be helpful if it worked for newer
> OS's, too. From what I can tell, there is no built-in way to do this,
> without performing additional work like rebooting the computer. I
> also found a VBS script that does an actual (bubble?) sort on the
> shortcuts, which is also something I want to avoid. From using
> SysInternals' Process Monitor, the best I can tell is that the Sort
> functionality is built into explorer.exe, but I have no idea if this
> API call is even exposed for programmers.
>
> Any suggestions?
>
> Thanks,
> Todd
>
This shows the registry changes more clearly:

http://samanathon.com/registry-hack-automatically-sort-the-programs-menu-alphabetically/
-----------

and this discusses the security API used to change registry key permissions:

http://www.xtremevbtalk.com/showthread.php?t=78240

In answer to your question, it is possible but requires the use of the
security api function. Unfortunately these are some of the more arcance
functions in the API. I haven't the time to run up an example for you,
however you should use MSDN to check out these functions:

RegSetKeySecurity
SetEntriesInACL

Of course, you need to be able to open the key to set these ACEs so your
program will need to be run from an administrative account first in
order to set the necessary access.
-----------

I recommend you post this in a newsgroup for whatever programming
language you are going to use and write a program that you can run from
the command line.

Mike





--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: ever90321 on
On May 24, 7:02 pm, mscir <ms...(a)yahoo.com> wrote:
>> On 5/24/2010 8:31 AM, ever90...(a)mypacks.net wrote:

[...]

> This shows the registry changes more clearly:
>
> http://samanathon.com/registry-hack-automatically-sort-the-programs-m...
> -----------
>
> and this discusses the security API used to change registry key permissions:
>
> http://www.xtremevbtalk.com/showthread.php?t=78240
>
> In answer to your question, it is possible but requires the use of the
> security api function. Unfortunately these are some of the more arcance
> functions in the API. I haven't the time to run up an example for you,
> however you should use MSDN to check out these functions:
>
> RegSetKeySecurity
> SetEntriesInACL
>
> Of course, you need to be able to open the key to set these ACEs so your
> program will need to be run from an administrative account first in
> order to set the necessary access.
> -----------
>
> I recommend you post this in a newsgroup for whatever programming
> language you are going to use and write a program that you can run from
> the command line.
>
> Mike
>
> --- news://freenews.netfront.net/ - complaints: n...(a)netfront.net ---

Thanks for all the replies, but there may have been a
misunderstanding. I don't want the Programs menu sorting itself
automatically forever, but only on cue, each time I run
"sortprograms.exe". It's looking more likely there's no registry or
OS trick for that, eh? But is there a way to link directly to the
"Sort" / "Sort by Name" functionality in explorer.exe (?) and avoid
all this messiness? I am not a C programmer (for a small,
straightforward program, it wouldn't be an impossible leap) and was
hoping/guessing that such a program must already exist somewhere.
Second takes anyone?

Thanks again,
Todd
From: mscir on
On 5/24/2010 5:33 PM, ever90321(a)mypacks.net wrote:
> On May 24, 7:02 pm, mscir<ms...(a)yahoo.com> wrote:
>>> On 5/24/2010 8:31 AM, ever90...(a)mypacks.net wrote:
>
> [...]
>
>> This shows the registry changes more clearly:
>>
>> http://samanathon.com/registry-hack-automatically-sort-the-programs-m...
>> -----------
>>
>> and this discusses the security API used to change registry key permissions:
>>
>> http://www.xtremevbtalk.com/showthread.php?t=78240
>>
>> In answer to your question, it is possible but requires the use of the
>> security api function. Unfortunately these are some of the more arcance
>> functions in the API. I haven't the time to run up an example for you,
>> however you should use MSDN to check out these functions:
>>
>> RegSetKeySecurity
>> SetEntriesInACL
>>
>> Of course, you need to be able to open the key to set these ACEs so your
>> program will need to be run from an administrative account first in
>> order to set the necessary access.
>> -----------
>>
>> I recommend you post this in a newsgroup for whatever programming
>> language you are going to use and write a program that you can run from
>> the command line.
>>
>> Mike
>>
>> --- news://freenews.netfront.net/ - complaints: n...(a)netfront.net ---
>
> Thanks for all the replies, but there may have been a
> misunderstanding. I don't want the Programs menu sorting itself
> automatically forever, but only on cue, each time I run
> "sortprograms.exe". It's looking more likely there's no registry or
> OS trick for that, eh? But is there a way to link directly to the
> "Sort" / "Sort by Name" functionality in explorer.exe (?) and avoid
> all this messiness? I am not a C programmer (for a small,
> straightforward program, it wouldn't be an impossible leap) and was
> hoping/guessing that such a program must already exist somewhere.
> Second takes anyone?
>
> Thanks again,
> Todd

Todd,

Sorry for the misunderstanding. I haven't seen anything that would do
what you're asking for. Would you mind explaining the application... is
this something you'd be running just to save time, or is it a feature
you want to add to a program you're installing or running?

Mike

--- news://freenews.netfront.net/ - complaints: news(a)netfront.net ---
From: ever90321 on
On May 24, 9:51 pm, mscir <ms...(a)yahoo.com> wrote:

> Todd,
>
> Sorry for the misunderstanding. I haven't seen anything that would do
> what you're asking for. Would you mind explaining the application... is
> this something you'd be running just to save time, or is it a feature
> you want to add to a program you're installing or running?
>
> Mike
>
> --- news://freenews.netfront.net/ - complaints: n...(a)netfront.net ---

It's meant to add some polish to a remote device management server.
Once a program (.exe, .msi, etc.) is installed over-the-air on the
laptop, "sortprograms.exe" would run once. I suppose it would be
possible to set each laptop to always sort Start -> Programs
automatically (or just let the folders fall where they may), but I
find this the cleanest solution. I'm often surprised at the features
lying under the surface of Windows when I go digging, but this seems
to be something that was left out.

If you or anyone has other suggestions, please let me know.
Autohotkey is looking pretty good right now! ;)