I got a situation where the rightclick option "Pin to Startmenu"
has been disabled for non native windows apps.
(Corporate environment)
Next best thing?
Make your application stick just underneath the pinned apps and not
"trickle down" the start list, but always be on top.
The position in this list is governed by several counters in the
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{F4E57C4B-2036-45F0-A9AB-443BCFE33D9F}\Count]
&
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{CEBFF5CD-ACE2-4F4F-9178-9926F41749EA}\Count] keys
The rule is ONLY SHORTCUTS initiated from the desktop or the programdata folder
will show up in this list, and they are located under the
[HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{F4E57C4B-2036-45F0-A9AB-443BCFE33D9F}\Count] key
The actual executable file these shortcuts are pointing to is in the other key
CEBFF5CD-ACE2-4F4F-9178-9926F41749EA
The counters are in the binary data, and by manipulating these values to high
numbers one effectively pushes the shortcuts to the top of the list.
You can use the Userassistview app to decode these entries as they are encoded in Rot13,
and get a view of the counters
Userassistview
Since desktop is a "current user" destination folder, i made a batchscript that
collects the %USERNAME% and converts it to Rot13 and writes it to a regfile that
gets applied with the manipulated binary values.
I then execute a pinvoke to refresh the startmenu.(Clearcache.exe)
Pinvoke
(So you don't need to logout or kill explorer for the changes to take place)
In this example i'm pushing Mozilla Firefox.Ink on the desktop, that's pointing to Mozilla Firefox.exe installed in the root of F: to the top of the startmenu (Rot13.bat)
Quote
@echo off&setlocal enabledelayedexpansion
set input=%USERNAME%
set "upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ"
set "upmap=NOPQRSTUVWXYZABCDEFGHIJKLM"
set "lomap=nopqrstuvwxyzabcdefghijklm"
set "step=%input:!=^!%"
:rotloop
if defined step (
set "isletter=false"
for /l %%x in (0,1,25) do (
if /i "!step:~0,1!"=="!upper:~%%x,1!" (
if "!step:~0,1!"=="!upper:~%%x,1!" (
set "out=!out!!upmap:~%%x,1!"
) else (
set "out=!out!!lomap:~%%x,1!"
)
set "isletter=true"
)
)
if "!isletter!"=="false" (
set "out=!out!!step:~0,1!"
)
set "step=!step:~1!"
goto rotloop
)
ECHO Windows Registry Editor Version 5.00 > ASSIST.reg
ECHO. >> ASSIST.reg
ECHO [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{F4E57C4B-2036-45F0-A9AB-443BCFE33D9F}\Count] >> ASSIST.reg
ECHO "P:\\Hfref\\!out!\\Qrfxgbc\\Zbmvyyn Sversbk.yax"=hex:00,00,00,00,02,05,01,00,\ >> ASSIST.reg
ECHO 00,00,00,00,00,ff,00,00,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,\ >> ASSIST.reg
ECHO 00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,ff,ff,\ >> ASSIST.reg
ECHO ff,ff,00,2c,d7,7f,70,66,cc,01,00,00,00,00 >> ASSIST.reg
ECHO. >> ASSIST.reg
ECHO [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{CEBFF5CD-ACE2-4F4F-9178-9926F41749EA}\Count] >> ASSIST.reg
ECHO "U:\\Zbmvyyn Sversbk.rkr"=hex:00,00,00,00,02,05,01,00,02,05,ff,00,00,00,00,00,\ >> ASSIST.reg
ECHO 00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,\ >> ASSIST.reg
ECHO 00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,ff,ff,ff,ff,00,2c,d7,7f,70,66,\ >> ASSIST.reg
ECHO cc,01,00,00,00,00 >> ASSIST.reg
REGEDIT /S ASSIST.reg
del ASSIST.reg
Clearcache.exe
cls
set input=%USERNAME%
set "upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ"
set "upmap=NOPQRSTUVWXYZABCDEFGHIJKLM"
set "lomap=nopqrstuvwxyzabcdefghijklm"
set "step=%input:!=^!%"
:rotloop
if defined step (
set "isletter=false"
for /l %%x in (0,1,25) do (
if /i "!step:~0,1!"=="!upper:~%%x,1!" (
if "!step:~0,1!"=="!upper:~%%x,1!" (
set "out=!out!!upmap:~%%x,1!"
) else (
set "out=!out!!lomap:~%%x,1!"
)
set "isletter=true"
)
)
if "!isletter!"=="false" (
set "out=!out!!step:~0,1!"
)
set "step=!step:~1!"
goto rotloop
)
ECHO Windows Registry Editor Version 5.00 > ASSIST.reg
ECHO. >> ASSIST.reg
ECHO [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{F4E57C4B-2036-45F0-A9AB-443BCFE33D9F}\Count] >> ASSIST.reg
ECHO "P:\\Hfref\\!out!\\Qrfxgbc\\Zbmvyyn Sversbk.yax"=hex:00,00,00,00,02,05,01,00,\ >> ASSIST.reg
ECHO 00,00,00,00,00,ff,00,00,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,\ >> ASSIST.reg
ECHO 00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,ff,ff,\ >> ASSIST.reg
ECHO ff,ff,00,2c,d7,7f,70,66,cc,01,00,00,00,00 >> ASSIST.reg
ECHO. >> ASSIST.reg
ECHO [HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\UserAssist\{CEBFF5CD-ACE2-4F4F-9178-9926F41749EA}\Count] >> ASSIST.reg
ECHO "U:\\Zbmvyyn Sversbk.rkr"=hex:00,00,00,00,02,05,01,00,02,05,ff,00,00,00,00,00,\ >> ASSIST.reg
ECHO 00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,00,\ >> ASSIST.reg
ECHO 00,80,bf,00,00,80,bf,00,00,80,bf,00,00,80,bf,ff,ff,ff,ff,00,2c,d7,7f,70,66,\ >> ASSIST.reg
ECHO cc,01,00,00,00,00 >> ASSIST.reg
REGEDIT /S ASSIST.reg
del ASSIST.reg
Clearcache.exe
cls
Red color = variable with Rot13 encoded username
Green color = 66818 times executed
Blue color = 65280 times executed
Orange color = 16712962 Focus counter
This post has been edited by linkking: 06 September 2011 - 04:46 PM



Help
Back to top








