Access hidden windows commands with buttons/menus/hotkeys

Many of the dialog boxes and management apps in Windows are hidden away in deep, dark corners. But since we're DOpus users, we can harness these hidden secrets, and assign them to menus, buttons , or hotkeys! Using these resources, I have built a new System menu in DOpus which gives me quick access to many these items. Here are some examples:

This opens the Safely Remove Hardware dialog:

RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll

This opens the Device Manager:

RunDll32.exe devmgr.dll DeviceManager_Execute

This opens the small volume control box wherever the cursor is - great for a Volume button! Leave off the /t tag if you want to bring up the full volume control dialog:

Sndvol32 /t

Below are some links to sites where you can find more shortcuts to hidden Windows items. All can be pasted just as you see them into buttons, hotkeys, or menu items in DOpus.

RunDll32 commands for XP:
http://www.dx21.com/SCRIPTING/RUNDLL32/REFGUIDE.ASP?ISF=0&P=A

RunDLL32 commands for Vista:
http://www.winvistaclub.com/t57.html

Run commands for XP, including Control Panel executables and Management Consoles:
http://foliovision.com/seo-tools/computers/windows/xp-run-commands/

Run commands that are exclusive to Vista (you can use the XP ones too, found in the previous link):
http://www.winvistaclub.com/f14.html

Last but not least, here's a button that will open the Control Panel in a new lister, not maximized, and with large icons - just like the standard Windows control panel would open:

<?xml version="1.0"?> <button backcol="none" display="label" separate="yes" textcol="none"> <label>Control Panel</label> <icon1>#newcommand</icon1> <function type="normal"> <instruction>go NEW=nodual,notree,norm /controls VIEW=LargeIcons </instruction> </function> </button>

Have fun!

Ive known about most of these for a while now and for some strange reason, I never really thought about putting them into my DirOpus..

Chalk another one to stupidity

Very good tips, the control panel was an instant success.

glad to help :slight_smile:

i find these especially useful since i replace Explorer with DOpus - that makes many commands much more difficult to access. i also replace my shell with Emerge Desktop, which further narrows down the ways i can get to these items. so building a new menu inside DOpus with all these in one place has helped speed things up a lot.

How come? You can access Control Panel through Opus the same as Explorer. You can also tell Opus not to take over Control Panel and let Explorer continue to handle it if you want. (That may be the default, too. Not sure though.)


you're right leo, i misspoke. it's primarily my shell that makes certain things harder to reach. i was thinking mostly of the right-click items you get via the My Computer icon, like System Properties, Disk Management, Device Manager, etc. these are not easily available to me only because i don't have a My Computer icon on my desktop but it doesn't really have anything to do with DOpus replacing Explorer as a file manager.

the only dialogs that are not reachable through DOpus are Folder Options and File File Types, but these are not needed whe running DOpus.

Whenever I use "Go /controls" to go to the control panel, windows explorer always opens up with the control panel. I can't find anywhere for Opus to take control.
I've tried both of these settings:
Settings - Preferences - Folders - Virtual Folders: "Treat all virtual filesystem folders as virtual" and "Treat all virtual folders as real"

They both seem to act the same way with the control panel by opening explorer.

Did something change with the Control Panel in Windows 7 64bit or did I just miss a setting somewhere?

Opus doesn't handle the control panel anymore from Vista onwards (and I can't think why you would want it to anyway :slight_smile:).

Some more (Windows Vista/7, XP don't know!):

Computer-Management

%SystemRoot%\system32\compmgmt.msc /s

Windows Update

%SystemRoot%\system32\wuapp.exe

Repair Startmenu-Icons (sometimes Win shows generic icons in startmenu, this will rebuild them)

Taskkill /f /IM Explorer.exe Delete %UserProfile%\IconCache.db QUIET Explorer.exe

[quote="garbanzo"]This opens the Safely Remove Hardware dialog:

RunDll32.exe shell32.dll,Control_RunDLL hotplug.dll

[/quote]

I tried to add a button with the above code to my toolbar. The button itself works fine, and brings up the expected dialog. However, for some reason I cannot eject any USB drive from that dialog. Event log says the device vetoed removal with veto 8. If I go to the taskbar tray icon to remove the drive, it works fine every time. I am pretty sure this is a Windows issue (maybe this particular dialog is deprecated, and shouldn't really be used anymore?), and has nothing to do with Opus directly. On the other hand, does anybody know how I could bring up a dialog that works? Having that eject button in Opus would be neat...

P.S.: This is on Win7x64.

If you right-click on the drive in Computer, do you get an Eject verb on the menu, and does it work?
If so, the Go EJECT command should also work.

Hey, this works perfectly! Thanks!

Hmm, now I tried also closing the associated tab once the device is removed, so I have

Go EJECT Go TABCLOSE

However, when I click on this button, I get a message saying that the device is busy. It seems that I would need a command that makes sure the eject operation is finished before trying to close the tab. Is there any way to accomplish this?

Try doing the two things the other way around:

@set DriveLetter={sourcepath$|\} Go TABCLOSE Go EJECT {$DriveLetter}

Ahh, that indeed works better. Thanks!

But... It turns out that my issue above turned out to be a bit of a fluke: Most of the time, my button above works fine. On the other hand, while your code has the effect of making my eject button work all the time, it has the disadvantage that it doesn't grey out when I'm on a device that can't be ejected. Can I have my cake and eat it, too?

By the way regarding opening USB devices, I think there is an inconsistency in the way the function in the Explorer popup Window (the one that comes up when I attach a USB device) works: If I click on "Open ... in Directory Opus" while no lister is open, the Opus opens a new lister that is kind of like the default lister in that it has all the predefined tabs in the destination lister, but the source lister has only one tab for the new device. If I do the same thing while the default lister is open, then a new tab is opened and added to the existing ones. I think I should get the same result when a new lister is opened.

Oh, and one more question: Is it possible to add a command to the tab context menu? So that I could right-click on any tab to close it and eject the associated USB device? That would be cool...