Add ipconfig /release/flushdns/renew to R-Click Context Menu?


netBAT

Member
Local time
8:42 AM
Posts
6
OS
Win11 Pro
Been looking around for such a tweak but to no avail... which is strange as it's a rather handy set of commands to have there intead of using something like a batch file.
I tried to conjure something up using my rather limited scripting skills but the commands didn't run properly when invoked from the context menu most likely due to permission issues even when accepting a UAC prompt.
Any ideas how to achieve the above?
 

My Computer

System One

  • OS
    Win11 Pro
I have a different approach. Create a text file, type all code there and save as renew.bat (without the . txt extension). Configure it to always run as Administrator and copy to the desktop. Every time you want just double click to execute.
 

My Computers

System One System Two

  • OS
    Windows 11 Pro 23H2 64-bit (build 22631.3235)
    Computer type
    Laptop
    Manufacturer/Model
    Acer Extensa 5630EZ
    CPU
    Mobile DualCore Intel Core 2 Duo T7250, 2000 MHz
    Motherboard
    Acer Extensa 5630
    Memory
    4GB
    Graphics Card(s)
    Mobile Intel(R) GMA 4500M (Mobile 4 series)
    Sound Card
    Realtek ALC268 @ Intel 82801IB ICH9 - High Definition Audio Controller
    Monitor(s) Displays
    1
    Screen Resolution
    1280x800
    Hard Drives
    Samsung SSD 850 EVO 250GB SATA Device (250 GB, SATA-III)
    Internet Speed
    VDSL 50 Mbps
    Browser
    MICROSOFT EDGE
    Antivirus
    WINDOWS DEFENDER
    Other Info
    Legacy MBR installation, no TPM, no Secure Boot, no WDDM 2.0 graphics drivers, cannot get more unsupported ;) This is only my test laptop. I had installed Windows 11 here before upgrading my main PC. For my main PC I use everyday see my 2nd system specs.
  • Operating System
    Windows 11 Pro v23H2 (build 22631.3235)
    Computer type
    PC/Desktop
    Manufacturer/Model
    Custom-built PC
    CPU
    Intel Core-i7 3770 3.40GHz s1155 (3rd generation)
    Motherboard
    Asus P8H61 s1155 ATX
    Memory
    2x Kingston Hyper-X Blu 8GB DDR3-1600
    Graphics card(s)
    Gainward NE5105T018G1-1070F (nVidia GeForce GTX 1050Ti 4GB GDDR5)
    Sound Card
    Realtek HD audio (ALC887)
    Monitor(s) Displays
    Sony Bravia KDL-19L4000 19" LCD TV via VGA
    Screen Resolution
    1440x900 32-bit 60Hz
    Hard Drives
    Patriot Burst Elite 480GB SSD as system disk, Western Digital Caviar Purple 4TB SATA III (WD40PURZ) as second
    PSU
    Thermaltake Litepower RGB 550W Full Wired
    Case
    SUPERCASE MIDI-TOWER
    Cooling
    Stock Intel CPU Fan, 1x 8cm fan at the back
    Mouse
    Sunnyline OptiEye PS/2
    Keyboard
    Mitsumi 101-key PS/2
    Internet Speed
    100Mbps
    Browser
    Microsoft Edge, Mozilla Firefox
    Antivirus
    Microsoft Windows Defender
    Other Info
    Legacy BIOS (MBR) installation, no TPM, no Secure Boot, WDDM 3.0 graphics drivers, WEI score 7.4
I have a different approach. Create a text file, type all code there and save as renew.bat (without the . txt extension). Configure it to always run as Administrator and copy to the desktop. Every time you want just double click to execute.
...which is strange as it's a rather handy set of commands to have there instead of using something like a batch file...
Hehe...
Your approach is identical to the one I've been using so far.
Yet my hope was to improve on on it by taking it a step forward.... or rightclick-ward I should say.
I tried to reverse engineer the awesome Add_[Create-restore-point]without_UAC_to_context_menu.bat but quickly concluded that this was way beyond my paygrade...
 

My Computer

System One

  • OS
    Win11 Pro
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushDNS]
"MUIVerb"="Flush DNS"
"Icon"="cmd.exe"
"Position"="Bottom"
"SubCommands"=""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushDNS\shell]

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushDNS\shell\01FlushDNS]
"HasLUAShield"=""
"MUIVerb"="Flush DNS"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushDNS\shell\01FlushDNS\Command]
@="PowerShell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/s,/k, IPconfig.exe /flushdns' -Verb runAs\""

Put that in a .reg file without 'code'and merge it.
It works for me by right clicking on the desktop.
If you want to personalize it, you can change the icon in "Icon" subkey.
 
Last edited:

My Computers

System One System Two

  • OS
    Win11 All /Debian/Arch
    Computer type
    Laptop
    Manufacturer/Model
    ASUSTeK COMPUTER INC. TUF Gaming FX705GM
    CPU
    2.20 gigahertz Intel i7-8750H Hyper-threaded 12 cores
    Motherboard
    ASUSTeK COMPUTER INC. FX705GM 1.0
    Memory
    24428 Megabytes
    Graphics Card(s)
    Intel(R) UHD Graphics 630 / NVIDIA GeForce GTX 1060
    Sound Card
    Intel(R) Display Audio / Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (17.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9
    Hard Drives
    2 SSD SATA/NVM Express 1.3
    WDS500G2B0A-00SM50 500.1 GB
    WDCSDAPNUW-1002 256 GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & ADSL Bouygues -fr
    Browser
    Edge Canary- Firefox Nightly
    Antivirus
    Windows Defender
    Other Info
    VMs of Windows 11 stable/Beta/Dev/Canary
    VM of XeroLinux- Arch based & Debian 12
  • Operating System
    Windows 11 Insider Canary
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X751BP
    CPU
    AMD Dual Core A6-9220
    Motherboard
    ASUS
    Memory
    8 GB
    Graphics card(s)
    AMD Radeon R5 M420
    Sound Card
    Realtek
    Monitor(s) Displays
    17.3
    Screen Resolution
    1600X900 16:9
    Hard Drives
    1TB 5400RPM
Put that in a .reg file without 'code'and merge it.
It works for me by right clicking on the desktop.
If you want to personalize it, you can change the icon in "Icon" subkey.

Ha!
Friggin awesome OAT :thumbsup:
I modified it slightly just to do the whole release/flush/renew cycle in one go and renamed it 'FlushIP'.
Will tinker a bit more with it tomorrow.

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushIP]
"MUIVerb"="Flush IP"
"Icon"="cmd.exe"
"Position"="Bottom"
"SubCommands"=""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushIP\shell]

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushIP\shell\01FlushIP]
"HasLUAShield"=""
"MUIVerb"="Flush IP"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushIP\shell\01FlushIP\Command]
@="PowerShell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/s,/k, ipconfig /release | ipconfig /flushdns | ipconfig /renew' -Verb runAs\""

Many thanks for your help!
 

My Computer

System One

  • OS
    Win11 Pro
  • Like
Reactions: OAT
The following syntax flushes the DNS correctly:

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushIP]
"MUIVerb"="Flush IP"
"Icon"="cmd.exe"
"Position"="Bottom"
"SubCommands"=""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushIP\shell]

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushIP\shell\01FlushIP]
"HasLUAShield"=""
"MUIVerb"="Flush IP"

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushIP\shell\01FlushIP\Command]
@="PowerShell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/s,/k, ipconfig /release && ipconfig /renew && ipconfig /flushdns' -Verb runAs\""
 

My Computer

System One

  • OS
    Win11 Pro
Depending on your configuration and your environment you could reset all your adapters by adding
&& ipconfig /registerdns at the very end.
For the average user on a non-network or a workgroup environment, it might be an overkill.
 

My Computers

System One System Two

  • OS
    Win11 All /Debian/Arch
    Computer type
    Laptop
    Manufacturer/Model
    ASUSTeK COMPUTER INC. TUF Gaming FX705GM
    CPU
    2.20 gigahertz Intel i7-8750H Hyper-threaded 12 cores
    Motherboard
    ASUSTeK COMPUTER INC. FX705GM 1.0
    Memory
    24428 Megabytes
    Graphics Card(s)
    Intel(R) UHD Graphics 630 / NVIDIA GeForce GTX 1060
    Sound Card
    Intel(R) Display Audio / Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (17.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9
    Hard Drives
    2 SSD SATA/NVM Express 1.3
    WDS500G2B0A-00SM50 500.1 GB
    WDCSDAPNUW-1002 256 GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & ADSL Bouygues -fr
    Browser
    Edge Canary- Firefox Nightly
    Antivirus
    Windows Defender
    Other Info
    VMs of Windows 11 stable/Beta/Dev/Canary
    VM of XeroLinux- Arch based & Debian 12
  • Operating System
    Windows 11 Insider Canary
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X751BP
    CPU
    AMD Dual Core A6-9220
    Motherboard
    ASUS
    Memory
    8 GB
    Graphics card(s)
    AMD Radeon R5 M420
    Sound Card
    Realtek
    Monitor(s) Displays
    17.3
    Screen Resolution
    1600X900 16:9
    Hard Drives
    1TB 5400RPM
Depending on your configuration and your environment you could reset all your adapters by adding
&& ipconfig /registerdns at the very end.
For the average user on a non-network or a workgroup environment, it might be an overkill.
Yeah I'm aware of that option but like you said that's something I personally would only need to use once in a blue moon... in which case it would make better sense to simply type it down the old fashioned way.

Final version for now...
No cascading subcommands and a randomly picked yet more relevant icon:

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushIP]
"MUIVerb"="Flush IP"
"Icon"="mobsync.exe"
"Position"="Bottom"
"HasLUAShield"=""

[HKEY_CLASSES_ROOT\DesktopBackground\Shell\FlushIP\Command]
@="PowerShell -windowstyle hidden -command \"Start-Process cmd -ArgumentList '/s,/k, ipconfig /release && ipconfig /renew && ipconfig /flushdns' -Verb runAs\""
 

My Computer

System One

  • OS
    Win11 Pro
Keep in mind that because of the location in the registry, a re-install or if you install Dev builds, this area will be overwritten, and you will lose that customization.
No need to tell you to save the .reg file. :-)
 

My Computers

System One System Two

  • OS
    Win11 All /Debian/Arch
    Computer type
    Laptop
    Manufacturer/Model
    ASUSTeK COMPUTER INC. TUF Gaming FX705GM
    CPU
    2.20 gigahertz Intel i7-8750H Hyper-threaded 12 cores
    Motherboard
    ASUSTeK COMPUTER INC. FX705GM 1.0
    Memory
    24428 Megabytes
    Graphics Card(s)
    Intel(R) UHD Graphics 630 / NVIDIA GeForce GTX 1060
    Sound Card
    Intel(R) Display Audio / Realtek(R) Audio
    Monitor(s) Displays
    Integrated Monitor (17.3"vis)
    Screen Resolution
    FHD 1920X1080 16:9
    Hard Drives
    2 SSD SATA/NVM Express 1.3
    WDS500G2B0A-00SM50 500.1 GB
    WDCSDAPNUW-1002 256 GB
    PSU
    19V DC 6.32 A 120 W
    Cooling
    Dual Fans
    Mouse
    MS Bluetooth
    Internet Speed
    Fiber 1GB Cox -us & ADSL Bouygues -fr
    Browser
    Edge Canary- Firefox Nightly
    Antivirus
    Windows Defender
    Other Info
    VMs of Windows 11 stable/Beta/Dev/Canary
    VM of XeroLinux- Arch based & Debian 12
  • Operating System
    Windows 11 Insider Canary
    Computer type
    Laptop
    Manufacturer/Model
    ASUS X751BP
    CPU
    AMD Dual Core A6-9220
    Motherboard
    ASUS
    Memory
    8 GB
    Graphics card(s)
    AMD Radeon R5 M420
    Sound Card
    Realtek
    Monitor(s) Displays
    17.3
    Screen Resolution
    1600X900 16:9
    Hard Drives
    1TB 5400RPM
hehe...
I have a folder on my NAS designated specifically for storing tweaks that are prone to go Houdini on me ✨
 

My Computer

System One

  • OS
    Win11 Pro
  • Like
Reactions: OAT

Latest Support Threads

Back
Top Bottom