Lay Ivan Sulaiman » Batch / Bash

cari.bat

Posted On Wednesday, February 18th, 2009

Comments Dropped no responses

Batch untuk search file di Windows…
Walaupun ga begitu akurat, yg ini g buat sendiri lho ^^


@echo off
title Mencari sesuatu...
color 1e
echo 1) Masukkan kata yang ingin di cari :
set /p key=
echo 2) Masukkan drive / path pencarian :
set /p loc=
echo 3) Hasil pencarian :
dir "%loc%" /b /s | find "%key%" | more
pause

Ganti IP Otomatis

Posted On Wednesday, February 18th, 2009

Comments Dropped one response

Salah satu batch file favorit, batch u/ ganti ip otomatis (Windows).

Tinggal setting dikit, lalu double-click :)


@ECHO OFF
rem Batch u/ ganti IP otomatis

set varip=
set varsm=255.255.255.0
set vargw=
set vardns1=
set vardns2=
set varhome=google.com

REM For the most up-to-date-info, visit http://samanathon.com/set-your-ip-address-via-batch-file/

REM ***** You don’t need to change anything below this line! ******

ECHO This fanciness is brought to you by Saman Sadeghi!

ECHO Setting IP Address and Subnet Mask
netsh int ip set address name = "Local Area Connection" source = static addr = %varip% mask = %varsm%

ECHO Setting Gateway
netsh int ip set address name = "Local Area Connection" gateway = %vargw% gwmetric = 1

ECHO Setting Primary DNS
netsh int ip set dns name = "Local Area Connection" source = static addr = %vardns1%

ECHO Setting Secondary DNS
netsh int ip add dns name = "Local Area Connection" addr = %vardns2%

ECHO Setting Internet Explorer Homepage to %varhome%
reg add "hkcu\software\microsoft\internet explorer\main" /v "Start Page" /d "%varhome%" /f

rem ECHO Here are the new settings for %computername%:
rem netsh int ip show config

pause

Categories

Find more posts by selecting categories.

Search

Search through our entire archives, and find the articles of your dreams. Use keywords, tags, or the post title if you happen to know it or parts of it. Chances are, we'll find something for you.

About this blog

Binusian Weblog (my diary + sharing knowledge)