It is currently Sun Dec 10, 2017 8:48 pm

All times are UTC - 8 hours [ DST ]


Forum rules


Please, keep discussions on topic and in the right forum. The start menu topics go into the Classic Start Menu forum, etc. This makes it easier for people to locate topics they are looking for.
If you get a satisfactory response to your question, please mark the topic as "solved". Click the green √ button in the bottom-right of the post.



Post new topic Reply to topic  [ 1 post ] 
Author Message
PostPosted: Fri Aug 05, 2016 9:12 am 
Online
User avatar

Joined: Thu Jan 03, 2013 12:38 am
Posts: 5340
Here is a way to add buttons to the Classic Explorer toolbar to add some useful functionality:

Open command prompt at currently open or currently selected folder:

1. Open Classic Explorer Settings
2. Make sure "Show all settings" is checked at the top and go to Toolbar Buttons tab.
3. Scroll down in the right column and add "Custom" item to left column by drag and drop from right column to left column.
4. Double click 'Custom' in left column.
5. Type this in the "Command:" field:

cmd /k pushd "%2"

6. For Tip or Label type anything you want. For example,

Open command prompt here

7. Pick an icon.
8. Click OK everywhere to save settings. Close and reopen the Explorer window.

This is how the button works:
- When a folder is selected in left/navigation/folder pane, command prompt will open there
- When a folder is selected in the right pane (files pane), command prompt will open there
- For a network path e.g. \\Windows-PC\Share1\Folder 1, it will work if the folder is selected in the right pane of Explorer
- If you have a mapped drive letter to a network share, it will work as well for navigation (left) pane and files (right) pane

Open command prompt as administrator at currently open or currently selected folder:


1. Download NirCmd, a free useful, trusted tool from here: http://www.nirsoft.net/utils/nircmd.html and copy it to your C:\Windows directory. If you are using 32-bit Windows, download 32-bit Nircmd. If 64-bit Windows, then 64-bit Nircmd.

2. Open Windows Explorer and go to C:\Program Files\Classic Shell. Create a folder called Commands.

3. Start Notepad as administrator and copy-paste this text into Notepad:
Code:
@echo off
If Defined selecteddir goto AdminCmdPrompt2 else goto AdminCmdPrompt1

:AdminCmdPrompt1
pushd %currentdir%
goto end

:AdminCmdPrompt2
pushd %selecteddir%
goto end

:End
CLS



4. Save this file as "AdminCmdPrompt.bat" in C:\Program Files\Classic Shell\Commands.
5. Open Classic Explorer Settings
6. Make sure "Show all settings" is checked at the top and go to Toolbar Buttons tab.
7. Scroll down in the right column and add "Custom" item to left column by drag and drop from right column to left column.
8. Double click 'Custom' in left column.
9. Type this in the "Command:" field:

nircmd elevate cmd /e:on /k pushd "%1" & set %selecteddir%="%2" & set %currentdir%="%1" & "%ProgramFiles%\Classic Shell\Commands\AdminCmdPrompt.bat"

10. For Tip or Label type anything you want. For example,

Open command prompt here as administrator

11. Pick an icon.
12. Click OK everywhere to save settings. Close and reopen the Explorer window.

This is how the button works:
- When a folder is selected in left/navigation/folder pane, command prompt will open there
- When a folder is selected in the right pane (files pane), command prompt will open there
- For a network path e.g. \\Windows-PC\Share1\Folder 1, it will work similarly!
- If you have a mapped drive letter to a network share, it will work similarly!

Open (any file) as administrator / Run program as administrator:


This is very useful too. For example, there might be some file in a UAC protected location which you need to modify as admin. Or run a program from Explorer as admin without context menu.

1. Download NirCmd, a free useful, trusted tool from here: http://www.nirsoft.net/utils/nircmd.html and copy it to your C:\Windows directory. If you are using 32-bit Windows, download 32-bit Nircmd. If 64-bit Windows, then 64-bit Nircmd.

2. Open Classic Explorer Settings
3. Make sure "Show all settings" is checked at the top and go to Toolbar Buttons tab.
4. Scroll down in the right column and add "Custom" item to left column by drag and drop from right column to left column.
5. Double click 'Custom' in left column.
6. Type this in the "Command:" field:

nircmd elevate "%2"
7. For Tip or Label type anything you want. For example,

Open as administrator

8. Pick an icon.
9. Click OK everywhere to save settings. Close and reopen the Explorer window.

Any item (file or folder) which you select in the right pane of Explorer can be opened as administrator. Even documents, pictures, music, videos and other file types will open with the default associated program as administrator.

_________________
Links to some general topics:

Compare Start Menus

Read the Search box usage guide.

I am a Windows enthusiast and Classic Shell tester.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 4 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group, Almsamim WYSIWYG Classic Shell © 2010-2016, Ivo Beltchev.
All right reserved.