Supercharge Q-Dir with custom commands and administrative privileges

Alex Osegueda
Apr 28, 2015
Updated • Jul 14, 2022
Tutorials
|
14

I work in IT Support in a company where our users don't have administrator rights. As per my job, I have to constantly access part of the operative system that require Administrator rights (registry keys, services, drivers, etc.) and it is a pain to ask the user to log off from their machines so we can login with our Administrator account.

You can always right click the application and run as Administrator and enter the administrator's password, but what if you require access to more than one piece of software, you would have to run and enter the password for each one of those applications.

There's an easier way; you can run a Windows Explorer alternative like Q-Dir and every application that you run from it will have admin rights. Martin already talked about Q-Dir here on Ghacks before.

So this is how I use Q-Dir: Download Q-Dir Portable to get started and extract the application, find Q-Dir.exe and run it as Administrator.

q-dir run administrator

Now any application that you launch from within Q-Dir will run as Administrator. You can check that by looking at the Task Manager. In this example, I am running Notepad as Administrator.

q-dir example

So what else can you do with Q-Dir?

There's a feature within Q-Dir where you can add custom commands. It's called RUN and it acts pretty much like the Windows Run window (Win + R). You can find it at the bottom of every Q-View.

custom commands

The cool thing about it is that you can save your most used commands and then execute them with a single click. By default, Q-Dir already comes with some useful commands but if you click Add, you can add your own.

custom commands 2

I added another command by typing Support/Ipconfig=%sysdir%\cmd.exe = /k ipconfig at the end of the list and then Save (the OK button does not seems to save your commands).

You need to add the= sign if you want to send a parameter to the application you are trying to run (in this case the Command Prompt). The / tells cmd.exe to stay open, otherwise, it would execute the command and then close.

This new command will add a new item to the list.

commands

command line
As you can see, this Command Prompt is also running as Administrator

You can also add commands to execute other portable programs.

I have created a new folder called Applications under the Q-Dir folder and I have placed in there another useful application called Process Explorer (procexp.exe).

process explorer

So now I can add Process Explorer to my commands and execute it with Administrator rights by adding this to the list Support/Process Explorer=.\Applications\procexp.exe and then clicking Save.

example

Q-Dir adds the icon of the application automatically. If Q-Dir shows a blank icon, it means that it couldn't find the file or the executable you are trying to run so you need to double check your command.

process explorer 2

All these settings are saved in the Q-Dir.ini file in the same folder where Q-Dir.exe is located (for portability reasons).

You can keep adding more applications and commands, some others commands I have found useful are:

  • Manage your PC: Support/Manage PC=%sysdir%/compmgmt.msc
  • Access the Windows Services: Support/Services=%sysdir%/services.msc
  • Access the Printer Server: Support/Print Server=%sysdir%/cmd.exe = /c rundll32 printui.dll,PrintUIEntry /s /t1 /c \\\%computername%

WARNING: save your files before executing these:

  • Turn off your PC in 10 seconds: Support/PC/Shutdown (10s)=%sysdir%\shutdown.exe = /s /t 10
  • Restart your PC in 10 seconds: Support/PC/Restart (10s)=%sysdir%\shutdown.exe = /r /t 10

Hope you guys found this guide useful. Q-Dir is part of the tools I use everyday for my job and these commands make my life easier.

Summary
Supercharge Q-Dir with custom commands and administrative privileges
Article Name
Supercharge Q-Dir with custom commands and administrative privileges
Description
Find out how to create custom commands in Q-Dir and the benefits of running the program with elevated privileges.
Author
Publisher
Ghacks Technology News
Logo
Advertisement

Previous Post: «
Next Post: «

Comments

  1. Chris said on July 13, 2022 at 9:57 pm
    Reply

    “You need to add the “=” sign if you want to send a parameter to the application you are trying to run (in this case the Command Prompt). The “/k” tells cmd.exe to stay open, otherwise, it would execute the command and then close.”

    What is “Q-Dir” for?

    I’m using Edge and FF and saw this cryptic signs on both…

    1. Martin Brinkmann said on July 14, 2022 at 6:34 am
      Reply

      Sorry for that, I have removed the garbled characters.

  2. Bob F said on February 4, 2019 at 10:21 pm
    Reply

    Sorry buy I love Q Dir but can’t run it as admin. I right click it and pick run as Admin but when I open the program and try to move a file I get the error msg. You need permission. I am the only user on the pc and I have full rights. Any hints? Maybe a run cmd?

  3. martin fennell said on August 19, 2017 at 12:40 pm
    Reply

    I’m trying out q-dir now.
    I like the 4 window option, but find it lacking in other areas.
    Why doesn’t it it have it’s own search engine.
    Why as in programs such as free commander, total commander and others is there no multi rename option.
    Why are there no keyboard shortcuts for such operations as moving and copying.
    The other thing i like about is that you can change the default colours quickly.
    Oh, and how do i get rid of that bloody clicking noise.

  4. PhoneyVirus said on May 6, 2015 at 4:54 am
    Reply

    Really nice to Ghacks continuing to live on, Honestly if I could write a article in little or no time, I would just email to Martin. Its a love hate relationship with this website, but there’s one thing I can say for sure, no matter what I’ll ways come back. Thanks Guys.

  5. Matthew Gladman said on April 29, 2015 at 12:50 am
    Reply

    The use of a third party explorer is not required. You can do the exact same trick with just regular Windows explorer…

    1. Close explorer.exe
    2. Open run / taskmgr >new task
    3. Navigate to c:/windows right click explorer.exe and run as admin

    Now everything you run will be as admin.

    The great thing about this method is it’s very easy to automate it via a bat script and requires no external application. (I’m on my phone on the train, otherwise I would share script)

    1. Alex Osegueda said on April 29, 2015 at 4:50 am
      Reply

      Hi Matthew

      I just tried that but it involved killing the explorer.exe process, which kills your desktop and your taskbar.
      I was then able to run explorer.exe as Administrator but it loads the Administrator’s desktop and taskbar. I then ran the Windows Explorer and any application kept running as my normal account, not the Administrator.

      Explorer.exe is part of the Windows shell so I’m not sure how well it will behave as it will be running half as your normal account and half as Administrator.

      Q-Dir being that is standalone application, won’t reset the Windows shell and the you can cleanly close it and close any application that you launched from it.

      It would be cool to learn how you would do this though and have a look at your script.

      Thanks for sharing.

  6. Alex Osegueda said on April 28, 2015 at 11:24 pm
    Reply

    Thanks everyone and thanks Martin to allow me to post on your site.
    I hope to contribute with more content soon. Many of the tools I use everyday I knew about from Ghacks so this is my way to contribute back to the site.
    Keep up the good work Martin :)

    1. Croatoan said on April 29, 2015 at 12:37 am
      Reply

      I welcome every program review for admins :D

  7. Croatoan said on April 28, 2015 at 10:04 pm
    Reply

    Every program that starts as admin has Admin child processes. But this custom commands are really nice. I will try them :D Really nice post. Keep up good work (y)

  8. RossN said on April 28, 2015 at 9:43 pm
    Reply

    Excellent. I think that explains why I couldn’t open the c:\users\xxx\sendto folder in Q-Dir
    I ‘ll be running this as Admin from now on.

  9. Dwight Stegall said on April 28, 2015 at 9:06 pm
    Reply

    I like portable Explorer++ best. Even working great in Windows 10 build 10061.

  10. Guest said on April 28, 2015 at 5:37 pm
    Reply

    I use Q-Dir constantly, but was not very familiarized with this command options.

  11. Martin Brinkmann said on April 28, 2015 at 3:28 pm
    Reply

    Thanks Alex for this great tutorial. Hope to read more in the coming months ;)

Leave a Reply

Check the box to consent to your data being stored in line with the guidelines set out in our privacy policy

We love comments and welcome thoughtful and civilized discussion. Rudeness and personal attacks will not be tolerated. Please stay on-topic.
Please note that your comment may not appear immediately after you post it.