• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Solved creating scripts


jamos316

Member
Member
Göteborg

Posts
78
#1
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 Number
    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

Harrylowt

New Member
Pro User
UK

Posts
333
#2
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

Users Who Are Viewing This Thread (Users: 0, Guests: 1)