Skip to content

Instantly share code, notes, and snippets.

@mlabrkic
Created February 2, 2022 12:21
Show Gist options
  • Save mlabrkic/99bdb3e82f6f735be55749490b20e0f5 to your computer and use it in GitHub Desktop.
Save mlabrkic/99bdb3e82f6f735be55749490b20e0f5 to your computer and use it in GitHub Desktop.
You need "admin-prompt.lnk" for "nvbat_goto_version_2.bat"
admin-prompt.txt
(You need "admin-prompt.lnk" for "nvbat_goto_version_2.bat")
OS: Windows 10
------------------------------------------------------------
How to open command prompt as administrator (because MKlink command):
https://stackoverflow.com/questions/30480228/run-command-to-open-command-prompt-as-administrator
Create "admin-prompt.lnk",
I put it in a folder in my Windows path (for example): C:\UTILS\
------------------------------------------------------------
1) Create a shortcut:
Right-click on your desktop (or elsewhere) to create a link („New Shortcut“).
Aka a .lnk file with an exceptionally well hidden extension.
2) Enter Location (C:\UTILS\admin-prompt.lnk)
( /k and what follows is just optional inspiration,
if you like a directory switch and listing to start with)
Target:
%windir%\system32\cmd.exe /k "cd C:\UTILS\ & dir /B"
3) Name shortcut.
let say...
admin-prompt
4) admin properties:
Open admin-prompt(.lnk) file properties , Shortcut Tab, Advanced:
[x] Run as administrator
5) Copy the generated admin-prompt² into a directory,
somewhere in your path. (C:\Windows\System32, if you are out of inspiration)
-->
C:\UTILS\
6) Here you go :-)
Run: Win-R, admin-prompt
("admin-prompt.lnk", I put it in a folder in my Windows path (for example): C:\UTILS\)
7) Optional :
Revisit the properties of your admin-prompt Link,
colors tab and style the background to a mild red,
so you can distinguish regular and admin prompts on your screen...
(lenght, buffer, font-size, and so on.)
------------------------------------------------------------
If you want to change shortcut properties:
File Explorer
https://support.microsoft.com/en-us/windows/find-and-open-file-explorer-ef370130-1cca-9dc5-e0df-2f7416fe1cb1
press the Windows logo key + E on your keyboard
C:\UTILS\admin-prompt.lnk
Right Click on shortcut, chose Properties.
------------------------------------------------------------
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment