Showing posts with label dos batch. Show all posts
Showing posts with label dos batch. Show all posts

Sunday, January 18, 2009

view content page by page

to read a specified file and page their contents to the host

PS> more startit.cmd

echo off
cls

color a
echo Starting Wireless Zero Configuration
pause
net start WZCSVC

echo.
echo Starting Windows Firewall
pause
net start SharedAccess

echo.
echo Starting Security Center
pause
net start wscsvc

-- More --

Saturday, January 17, 2009

install Device drivers automatically

Managing those device drivers can be collected into a CD, however, administering them tends to harder to handle. So, I write a DOS batch file called autoinst.bat:


echo off
echo chipset driver...
start "installing..." /wait "E:\_apbk\Drivers-xp\chipset\setup.exe" -s

echo graphics driver..
start "installing..." /wait "E:\_apbk\Drivers-xp\video\setup.exe" -s

echo audio driver...will reboot pc
start "installing..." /wait "E:\_apbk\Drivers-xp\Audio\setup.exe" -b -s

that install motherboard chipset driver, followed by video and then audio. Lastly, it will restart Windows.

make Gaming smoother

Nowsdays games eat lots of system resources, most NT services can be disabled. So, I write a DOS batch called services_xp.bat:

echo off

echo.
echo Ready to turn off NT services before playing games....
pause

echo .NET Runtime Optimization Service v2.0.50727_X86
pause
net stop clr_optimization_v2.0.50727_32

echo .
echo DHCP Client
pause
net stop dhcp

echo.
echo Distributed Link Tracking Client
pause
net stop TrkWks

echo.
echo DNS Client
pause
net stop Dnscache

echo.
echo Fast User Switching Compatibility
pause
net stop FastUserSwitchingCompatibility

echo.
echo Help and Support
pause
net stop helpsvc

echo.
echo IPSEC Services
pause
net stop PolicyAgent

echo.
echo LightScribeService Direct Disc Labeling Service
pause
net stop LightScribeService

echo.
echo Print Spooler
pause
net stop Spooler

echo.
echo Remote Registry takes very long time to disable itself. mission abort.
pause
rem net stop RemoteRegistry

echo.
echo Server
pause
net stop lanmanserver

echo.
echo SSDP Discovery Service takes very long time to disable itself. mission abort.
pause
rem net stop SSDPSRV

echo.
echo TCP/IP NetBIOS Helper takes very long time to disable itself. mission abort.
pause
rem net stop LmHosts

echo.
echo Themes
pause
net stop Themes

echo.
echo Workstation
pause
net stop lanmanworkstation

echo.
echo All done well.
echo ready to exit
pause
exit

that will automatically perform the disabling task. This really put me smile all day long!

keep IE safe and sound

One wonders those free programs that allows one to clear traces especially after using MSIE, either shareware, trial or donationware etc. Well, I write a DOS batch file called rundll32_vista.cmd:

echo off

echo delete IE addons tracking records
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 4351

echo delete IE miscellaneous files
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 255

echo delete IE password stored
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 32

echo delete IE autofill form data
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 16

echo delete IE temporary files
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 8

echo delete IE cookies
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 2

echo delete IE history list
RunDll32.exe InetCpl.cpl,ClearMyTracksByProcess 1

pause
exit

which do the most daunting job ever for me free of downloading them. See the magic works!

remove Unused devices

After sometime ago I wonder what devices have been installed via its Automatic Updates in XP or Vista. Normally these hidden device names are not visible in Device Manager and I have to sieve through Windows registry database to locate and verify one by one. Then an idea of DOS scripting came to my mind, so I started to write a batch file:


echo off

set devmgr_show_nonpresent_devices=1
devmgmt.msc
exit

that allows me to view all devices that are commonly displayed by Windows and check its device properties to make wise judgment. Wow, superb!

repair Vista Boot

The other day after installing Windows XP into my system over Vista, the Vista boot manager menu is no longer appearing. So, I write a DOS batch file called nt60repair.bat:-

@echo off

color a

echo Run DAEMON first...
pause

echo.
echo Load vu5384.iso ....
pause

d:
cd boot
bootsect /nt60 c:

echo.
echo Vista Boot Manager repaired...
pause

Because vu5384.iso, a Vista beta, is to be used for repairing, a virtual CDROM utility program has to be first installed and loaded it. This way I don't have to reinstall Vista.