Solved creating scripts

jamos316

Member
Member
Messages
78
Location
Göteborg
how can you create a script to open cmd and run 'ipconfig /flushdns' at the click of a button?
 

My Computer

System One

  • OS
    Windows 8.1 Pro Update 1
    Computer type
    Laptop
    System Manufacturer/Model
    ASUS K53SV
    CPU
    Intel i7 2Ghz
    Memory
    8GB
    Graphics Card(s)
    Intel & Nvidia 540M
    Hard Drives
    595GB
    Internet Speed
    100Mbps Download & Upload
    Browser
    Goggle Chrome
    Antivirus
    Windows Defender
Hi Jamos,

Hope all is well!

A simple way to do this would be bring up notepad application:

Type in:
Code:
Ipconfig /flushdns


Then go File > save as > drop "Save as type" to "all Files"

then in filename type for example "Flushdns.bat"


You just need to make sure it runs as a BAT file.


If you want to stop the cmd window from disappearing after the command has ran you can use this:

Code:
Ipconfig /flushdns

pause


An example of this:

4.png

then running the BAT file:

6.png


If you want it to be a PowerShell script then you can run use ".ps1" file extension.

Hope that helps!

Cheers,
Harry
 

My Computer

System One

  • OS
    Windows Server 2012 R2 / 8.1
Back
Top