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


netBAT

New member
Local time
9:30 PM
Posts
6
Visit site
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

spapakons

Well-known member
Power User
VIP
Local time
12:30 PM
Posts
1,699
Location
Athens
Visit site
OS
Windows 11 Pro 22H2 64-bit (build 22621.1105)
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 22H2 64-bit (build 22621.1105)
    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 v22H2 (build 22621.1105)
    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

netBAT

New member
Thread Starter
Local time
9:30 PM
Posts
6
Visit site
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.
...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

OAT

I never seem to know enough.
Member
Local time
3:30 AM
Posts
450
Location
San Diego, CA
Visit site
OS
Windows 11 Pro for workstation Dev
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
    Windows 11 Pro for workstation Dev
    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
    Keyboard
    AZERTY
    Mouse
    MS Bluetooth
    Internet Speed
    ADSL
    Browser
    Edge Canary- Firefox Nightly
    Antivirus
    Windows Defender
  • Operating System
    Windows 11 Insider Beta
    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

netBAT

New member
Thread Starter
Local time
9:30 PM
Posts
6
Visit site
OS
Win11 Pro
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

netBAT

New member
Thread Starter
Local time
9:30 PM
Posts
6
Visit site
OS
Win11 Pro
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

OAT

I never seem to know enough.
Member
Local time
3:30 AM
Posts
450
Location
San Diego, CA
Visit site
OS
Windows 11 Pro for workstation Dev
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
    Windows 11 Pro for workstation Dev
    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
    Keyboard
    AZERTY
    Mouse
    MS Bluetooth
    Internet Speed
    ADSL
    Browser
    Edge Canary- Firefox Nightly
    Antivirus
    Windows Defender
  • Operating System
    Windows 11 Insider Beta
    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

netBAT

New member
Thread Starter
Local time
9:30 PM
Posts
6
Visit site
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.
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

OAT

I never seem to know enough.
Member
Local time
3:30 AM
Posts
450
Location
San Diego, CA
Visit site
OS
Windows 11 Pro for workstation Dev
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
    Windows 11 Pro for workstation Dev
    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
    Keyboard
    AZERTY
    Mouse
    MS Bluetooth
    Internet Speed
    ADSL
    Browser
    Edge Canary- Firefox Nightly
    Antivirus
    Windows Defender
  • Operating System
    Windows 11 Insider Beta
    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

netBAT

New member
Thread Starter
Local time
9:30 PM
Posts
6
Visit site
OS
Win11 Pro
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

Top Bottom