Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,771,700 Members 42,739 Now Online
XDA Developers Android and Mobile Development Forum

[Script]Tools Menu v.05

Tip us?
 
pbanj
Old
(Last edited by pbanj; 9th July 2014 at 03:53 AM.) Reason: added new ver
#1  
pbanj's Avatar
Senior Member - OP
Thanks Meter 89
Posts: 309
Join Date: Dec 2011
IF USING AN OLD VER RUN THE UNINSTALL BEFORE INSTALLING A NEW VER

This is a batch file i made to install a tools menu i made. it came to be out of me being lazy and not wanting to have to open menus or hold shift
i did not make the scripts that some of the options use(credit is in the script).
see pictures to see the options and what it looks like in the end

IF ON WINDOWS RT YOU MUST BE JAILBROKEN TO USE. Thanks GoodDayToDie, it is now perfect

Main

 


Install

 


Uninstall

 


Installs finished

Tools

 


Power

 


Power with extras

 



Changelog
 

v0.2 - added open powershell as admin here, fixed open cmd as admin here, no longer need ele.exe and the e.cmd file
v0.3 - able to remove the restart explorer.bat file thanks to coldbloc
v0.4 - added power menu. normal has lock, logoff, restart, restart with boot options, and shut down. the second has all of the first but sleep, hibernate, and switch user.
v0.5 - fixed an issue in the hidden files vbs(thanks LEDelete for pointing it out), fixed missing icon folder copy command in install script (thanks trm96 for pointing that out) should fix icons not showing up


the script has some swears i found them funny, again the script was made for me i just figured others my find it helpful.


if the icons dont show up reboot


Download Tools Menu
The Following 30 Users Say Thank You to pbanj For This Useful Post: [ Click to Expand ]
 
coldbloc
Old
(Last edited by coldbloc; 26th November 2013 at 11:59 AM.)
#2  
coldbloc's Avatar
Member
Thanks Meter 8
Posts: 60
Join Date: Nov 2013
Looks cool.

So imagine I copy a registry key to my clipboard, does this regedit command capture it and open directly ? I checked, it only opens registry. Wonder if this MJ snippet would work in RT.

http://forums.mydigitallife.info/threads/38208

 
FYI, I don't prefer to kill-explorer like that, I think some settings that are not finalized until logoff can be lost when doing so, so instead I just logoff. But to each his own.


You can also change the position setting and the flyout will move to top or bottom of your menu. Make change in same key as the muiverb.

Code:

[HKEY_CLASSES_ROOT\Directory\background\shell\Tools]
"MUIVerb"="Tools"
"SubCommands"="regedit.Tools;Open Admin Cmd here.Tools;Open Cmd Here.Tools;Files Extensions.Tools;Hidden Files.Tools;Restart Explorer.Tools"
"Icon"="C:\\Windows\\tools.ico"
"Position"="Top"
I forget the trick to add an extra divider line.

EDIT: I've never been able to get more then 12 subcommands even with nested flyouts, if anyone knows how I am all ears.


The Following User Says Thank You to coldbloc For This Useful Post: [ Click to Expand ]
 
pbanj
Old
(Last edited by pbanj; 26th November 2013 at 08:37 PM.)
#3  
pbanj's Avatar
Senior Member - OP
Thanks Meter 89
Posts: 309
Join Date: Dec 2011
Quote:
Originally Posted by coldbloc View Post
Looks cool.

So imagine I copy a registry key to my clipboard, does this regedit command capture it and open directly ? I checked, it only opens registry. Wonder if this MJ snippet would work in RT.

http://forums.mydigitallife.info/threads/38208

 
FYI, I don't prefer to kill-explorer like that, I think some settings that are not finalized until logoff can be lost when doing so, so instead I just logoff. But to each his own.


You can also change the position setting and the flyout will move to top or bottom of your menu. Make change in same key as the muiverb.

Code:

[HKEY_CLASSES_ROOT\Directory\background\shell\Tools]
"MUIVerb"="Tools"
"SubCommands"="regedit.Tools;Open Admin Cmd here.Tools;Open Cmd Here.Tools;Files Extensions.Tools;Hidden Files.Tools;Restart Explorer.Tools"
"Icon"="C:\\Windows\\tools.ico"
"Position"="Top"
I forget the trick to add an extra divider line.

DIT: I've never been able to get more then 12 subcommands even with nested flyouts, if anyone knows how I am all ears.


tbh the reason i didnt put a position in is i couldnt decide where i wanted it and where it was worked with the rest of the stuff in my context.
as for restarting explorer i run in testmode 24/7 so after i remove the watermarks i just restart explorer rather then logging off. its also helpful if explorer decides to lock up.

well i was bored so i added the option to choose position to it
The Following User Says Thank You to pbanj For This Useful Post: [ Click to Expand ]
 
coldbloc
Old
#4  
coldbloc's Avatar
Member
Thanks Meter 8
Posts: 60
Join Date: Nov 2013
Quote:
Originally Posted by pbanj View Post
i run in testmode 24/7 so after i remove the watermarks
That sounds like you have to do it every reboot. Are the mui files protected in RT and we are unable to edit the watermark permanently ?

If I write a snip to add powershell run-as admin would you add it to your Tool™


 
pbanj
Old
(Last edited by pbanj; 27th November 2013 at 11:45 PM.)
#5  
pbanj's Avatar
Senior Member - OP
Thanks Meter 89
Posts: 309
Join Date: Dec 2011
Quote:
Originally Posted by coldbloc View Post
That sounds like you have to do it every reboot. Are the mui files protected in RT and we are unable to edit the watermark permanently ?

If I write a snip to add powershell run-as admin would you add it to your Tool™
not at every boot once its done its done but i added it as it was more for when i do fresh installs, im adding it in now

edit one
i was able to get the admin cmd to work without the need of the extra files so those have been removed. i will be uploading it in a few min


edit two
new ver is uploaded, i added a ver number to it to help me keep track of it. you will have to run the uninstall part in the old one first before running the install on this as i have removed some unneeded stuff
 
coldbloc
Old
#6  
coldbloc's Avatar
Member
Thanks Meter 8
Posts: 60
Join Date: Nov 2013
 
Quote:
Originally Posted by pbanj View Post
not at every boot once its done its done but i added it as it was more for when i do fresh installs, im adding it in now

edit one
i was able to get the admin cmd to work without the need of the extra files so those have been removed. i will be uploading it in a few min


edit two
new ver is uploaded, i added a ver number to it to help me keep track of it. you will have to run the uninstall part in the old one first before running the install on this as i have removed some unneeded stuff


That's a different way of doing it. Lately for elevation most people are using APPCOMPATFLAGS or an inline elevator script. Had never seen an example using just "ExplorerCommandHandler" and "ImpliedSelectionModel" settings before.

http://windowssucks.wordpress.com/fi...-registration/

Does that only work on newer builds, I searched my W7x64 registry for that canonical GUID (the powershell one) didn't come up with anything. Where did you find it.


 
pbanj
Old
#7  
pbanj's Avatar
Senior Member - OP
Thanks Meter 89
Posts: 309
Join Date: Dec 2011
Quote:
Originally Posted by coldbloc View Post

That's a different way of doing it. Lately for elevation most people are using APPCOMPATFLAGS or an inline elevator script. Had never seen an example using just "ExplorerCommandHandler" and "ImpliedSelectionModel" settings before.

http://windowssucks.wordpress.com/fi...-registration/

Does that only work on newer builds, I searched my W7x64 registry for that canonical GUID (the powershell one) didn't come up with anything. Where did you find it.
i found it in a program that adds items to the context menu but when it added powershell it would crash explorer so i used it as a base and started messing with it until it worked without crashing explorer(fun times). im not sure if it works in windows 7 as im on 8.1
 
coldbloc
Old
(Last edited by coldbloc; 28th November 2013 at 01:57 PM.)
#8  
coldbloc's Avatar
Member
Thanks Meter 8
Posts: 60
Join Date: Nov 2013
Understood, not available in W7, likely only 8.0 and up. I find it here in W8.1.

 
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\CLSID\{BF0AC53F-D51C-419F-92E3-2298E125F004}]
@="Open Powershell as Admin Command"

[HKEY_CLASSES_ROOT\CLSID\{BF0AC53F-D51C-419F-92E3-2298E125F004}\InProcServer32]
@=hex(2):25,00,53,00,79,00,73,00,74,00,65,00,6d,00,52,00,6f,00,6f,00,74,00,25,\
  00,5c,00,73,00,79,00,73,00,74,00,65,00,6d,00,33,00,32,00,5c,00,73,00,68,00,\
  65,00,6c,00,6c,00,33,00,32,00,2e,00,64,00,6c,00,6c,00,00,00
"ThreadingModel"="Apartment"


Maybe can even use the GUID list of control panel items the same way.

http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx

Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\OAPS.Tools]
"ImpliedSelectionModel"=dword:00000001
"Icon"="imageres.dll,-5373"
"ExplorerCommandHandler"="{BF0AC53F-D51C-419F-92E3-2298E125F004}"
@="Admin Pshell Here"
and I remembered how to do the divider line trick.

Code:
"SubCommands"="regedit.Tools;|;OACh.Tools;OCH.Tools;|;OAPS.Tools;|;FE.Tools;HF.Tools;|;RE.Tools"
Think you can get rid of the Restart_Explorer.bat with this.

http://www.robvanderwoude.com/condexec.php

Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\RE.Tools]
"Icon"="C:\\Windows\\explorer.exe"
"MUIVerb"="Restart Explorer"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\RE.Tools\command]
@="taskkill /f /im explorer.exe && start explorer.exe"
and this could toggle file extensions, without the .vbs

Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\FE.Tools]
"Icon"="C:\\Windows\\file.ico"
"MUIVerb"="Files Extensions"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\FE.Tools\command]
@="start /wait /b powershell -command \"$check = (Get-ItemProperty -Path 'registry::HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced' -Name 'HideFileExt').HideFileExt;if ($check -eq 0){Set-ItemProperty -Path 'registry::HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced' -Name 'HideFileExt' -Value 1} else {Set-ItemProperty -Path 'registry::HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced' -Name 'HideFileExt' -Value 0}\""
;
;


 
pbanj
Old
#9  
pbanj's Avatar
Senior Member - OP
Thanks Meter 89
Posts: 309
Join Date: Dec 2011
Quote:
Originally Posted by coldbloc View Post
Think you can get rid of the Restart_Explorer.bat with this.

http://www.robvanderwoude.com/condexec.php

Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\RE.Tools]
"Icon"="C:\\Windows\\explorer.exe"
"MUIVerb"="Restart Explorer"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\RE.Tools\command]
@="taskkill /f /im explorer.exe && start explorer.exe"
and this could toggle file extensions, without the .vbs

Code:
[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\FE.Tools]
"Icon"="C:\\Windows\\file.ico"
"MUIVerb"="Files Extensions"

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\CommandStore\shell\FE.Tools\command]
@="start /wait /b powershell -command \"$check = (Get-ItemProperty -Path 'registry::HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced' -Name 'HideFileExt').HideFileExt;if ($check -eq 0){Set-ItemProperty -Path 'registry::HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced' -Name 'HideFileExt' -Value 1} else {Set-ItemProperty -Path 'registry::HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\Advanced' -Name 'HideFileExt' -Value 0}\""
;
;
tried both of those with no luck, the restart explorer one made a cmd window pop up real fast, all i could see was it said invalid something. the file extension one didnt do anything

i would love to be able to get rid of the scripts
 
coldbloc
Old
(Last edited by coldbloc; 29th November 2013 at 03:46 AM.)
#10  
coldbloc's Avatar
Member
Thanks Meter 8
Posts: 60
Join Date: Nov 2013
Quote:
Originally Posted by pbanj View Post
tried both of those with no luck, the restart explorer one made a cmd window pop up real fast, all i could see was it said invalid something. the file extension one didnt do anything

i would love to be able to get rid of the scripts
On the file extension, I forget the refresh. Here is the snip, it goes somewhere near the end. FYI, I need rewrite it registry > cmd > powershell escape character safe.

I want to be sure it's just the refresh causing the problem and that the registry still got toggled, proving the powershell did run in the background and was not stopped by execution policy. Will you confirm by running the old script and manually hitting refresh.


 
Code:
;[void][System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms');[System.Windows.Forms.SendKeys]::SendWait('{F5}');



Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes