Click here to Skip to main content
13,633,761 members
Click here to Skip to main content
Add your own
alternative version

Tagged as


Posted 12 Sep 2017
Licenced MIT

Opening Apps from the Directory You're in as Administrator

, 12 Sep 2017
Rate this:
Please Sign up or sign in to vote.
Opening apps from the directory you're in as administrator

The other day, I saw a post that Greg Duncan shared about opening CMD and PowerShell from the directory you're in.

Now although there is no rocket science behind this, I never thought of ever trying it, now that I have tried it, I can't use it. Sad smile

The Problem is…

You see the problem is every time I need a CMD or PowerShell window, it generally needs to be running in admin mode (anyone who knows how, let me know Open-mouthed smile).

The Resolution is…

Now being a week since seeing the post, I really feel that I should be using this gem, so I decided to write code to make it possible for me. I won't go into too much detail because the code is on GitHub ( Basically, all you do is:

  1. Copy the admin.exe from the compiled folder on GitHub (or pull down the code and compile yourself) into your windows folder, which is location in C:\Windows by default.
  2. Click in the address bar in Windows explorer.


  3. Type any command:


  4. Press enter and see it launch that app as Administrator with the working directory set correctly:


Hope this little utility will fill this little gap I had for others as well. Open-mouthed smile


This article, along with any associated source code and files, is licensed under The MIT License


About the Author

Gordon Beeming (RSA)
Software Developer Nologo Studios
South Africa South Africa
Gordon Beeming works at Nologo Studios in the sunny city of Durban, South Africa. He is the Lead for the Data and Services Team and has a strong focus on Developer Efficiencies and R&D. When he's not hacking away at a keyboard in Visual Studio he'll generally be relaxing with his family or hitting the black top getting in some mileage. He is a Visual Studio ALM Rangers, Visual Studio ALM MVP.

You may also be interested in...


Comments and Discussions

-- There are no messages in this forum --
Permalink | Advertise | Privacy | Cookies | Terms of Use | Mobile
Web04-2016 | 2.8.180712.1 | Last Updated 12 Sep 2017
Article Copyright 2017 by Gordon Beeming (RSA)
Everything else Copyright © CodeProject, 1999-2018
Layout: fixed | fluid