Batch files you can't live without

SlickEddie

Limp Gawd
Joined
Jun 21, 2004
Messages
230
list batch files you can't live without (and post the file here if you can i'm trying to obtain a lot of usefull batch files) right now i only have one. Uptime.bat it tells you how long your system has been up.

@echo.
@systeminfo | @find "System Up Time:"
@echo.
@pause

please post your favorites!
 
I created a nice batch that opens 4 of my favorite websites in Internet Explorer, all in separate windows. That was nice. I tend to use Firefox more now so I don't use that batch very much any longer.
 
an Excerpt of Rampant Paranoia 101 > Shares Security Modual

disabling IPC$ Shares
for this you will need to download a few files (included in a few resource kits)
download here (autoexnt package)
you should have
Instexnt.exe
Autoexnt.exe
Servmess.dll

then open the notepad and type > net share IPC$ /delete
save as > Autoexnt.bat

than copy all 4 to WINNT\system32
then Start > Run > CMD > (type) instexnt install
at the command prompt > Enter
you should get
Code:
C:\Documents and Settings\Administrator > instexnt install
CreateService AutoExNT SUCCESS
 with InterActive Flag turned OFF.

C:\Documents and Settings\Administrator>

then Start > Run > regedit (XP\W23) or regdt32 (W2K\NT) naviagte to > HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\AutoExNT
Highlight it and on the top toolbar > Edit > Add value > (type) DependOnService > select REG_MULTI_SZ as the data type from the dropdown list > OK > a Multi-String Editor window will popup type > LanManServer > and > LanManWorkstation > OK

if the DependOnService value already exists, simply double click it and add
LanManServer > and > LanManWorkstation

Now reboot and after startup
Start > Run > compmgmt.msc > Expand Share Folders > Select Shares > you shouldnt see anything

what has effectively been done is you have installed a service that starts a batch file at startup, now you really need to protect that file, Id recommend hiding it, and placing a file checker or other security monitoring utility to watch it for changes, any other batch commands youd like to add could also be included
-------------------------------------------------------------------------------------------------------------------------------

you can of course add any other batchfile commands to Autoexnt ;)
 
I use a couple of batch files to do the tedious cleaning af old temp and install files.

1. batch file only has one line - that will give you the GUI for the Disk cleaner but check out all the options you get, you only need to run this file once to configure DC. (Beware Disk Cleaner might crash if your following Blackviper.com service disabling - I don't know what dependencies it has).

Automated Clean & Defrag XP #1-ENG.bat :

Code:
cleanmgr /sageset:99

2. batch file is the batch file you use over and over again, place this file on the system drive and make a shortcut or place it on the desktop (delete :: to make the file work):

Automated Clean & Defrag XP #2-ENG.bat :

Code:
echo off
echo -E's cleanup XP and Defrag automated - ENGLISH Windows XP
::delete the "::" to make the file effective.
::Insert systemdrive letter here ex c: if this file is not located on the system drive
cd "%USERPROFILE%\Local Settings\Temp"
::del /q /s /f *.*
cd "%USERPROFILE%\Local Settings\Temporary Internet Files"
::del /q /s /f *.*
cd "%SystemRoot%\Temp"
::del /q /s /f *.*
::cleanmgr /sagerun:99
::ex use "defrag c: -f" to force defrag on drives with less than 15% free space
::defrag c:
::defrag d:
::defrag e:
::defrag f:
::defrag g:
::etc you get the idea!
pause

Take it, improve it or modify it - just don't blame me when you get BSOD on restart ;)

I take no responibility for people who are not smart enough to use this "code"

If your not sure of what your doing, place this file in it's own dir and it will delete itself first if anything else fails - thereby saving your install.

enjoy
 
Back
Top