31 August 2010

AutoExNT: Running a batch file before logging into WINDOWS

If you ever need to run a batch file on a SYSTEM level before logging into WINDOWS (e.g. to set static ARP entries), then AutoExNT is the right tool for you!
Check out http://support.microsoft.com/kb/243486 for help on how to do the AUTOEXNT stuff.

Basically you'll need to create a batch file and then do these two simple steps:
  1. Copy the Autoexnt.bat file you just created, in addition to the Autoexnt.exe, Servmess.dll, and Instexnt.exe files located in the Resource Kit CD-ROM to the %SystemRoot%\System32 folder on your computer.
  2. At a command prompt, type instexnt install, and then press ENTER. 
Then, if you want to only run the service ONCE add in the line "sc config autoexnt start= disabled" to the end of your batch file (or before you run the command, just in case you only want to run the file once, regardless of success: you don't want to be stuck in an infinite loop if your program / command is faulty and it never disables the service).

DOWNLOAD? Go to http://www.microsoft.com/downloads/details.aspx?familyid=9d467a69-57ff-4ae7-96ee-b18c4790cffd&displaylang=en and grab all the Windows Server 2003 Resource Tool Kits! Have fun!

26 August 2010

WINDOWS Force Automatic Updates on WSUS

Forcing an immediate update detection via your local WSUS is a very handy thing to know how to do, and even more handy is the website that provides you with the cut-and-paste goodness to create your own update script in no time!

Visit http://msmvps.com/blogs/athif/pages/66375.aspx for all the low-down, but for quick reference, copy everything below the line into a TXT file and rename to .BAT or .CMD:

16 August 2010

Command-line SMTP e-mailer

Want to send an email through a simple command-line batch file? Then check this out!

Combining the latest cellphones supporting e-mail and an SMTP server with BMAIL will turn your scheduled tasks into SUPER SCHEDULED TASKS (I know, lame, but it was worth a shot).

Basically, you deploy the BMAIL.EXE file somewhere, and then you just run your tasks as usual, and at the end of your batch file, chuck in a line like 

"c:\tools\bmail.exe -s mysmtp.server.com -t myemail@address.com -f this@is.from.me -h -a "Default Subject" -b "with this Body"

and then you'll get an email to your myemail@address.com address with an email entitled "Default Subject" - how handy is that? AND BEST OF ALL - IT'S LIGHTWEIGHT AND FREE!!