Tuesday, August 31, 2010

Automatically Print NT Backup Logs - Revised

A serious shortcoming of today's printers is an inability to print output from MS-DOS (or is it a Windows shortcoming?)  One way around this is the wordpad /pt [filename] [printer] command.  Here's a revised PRTBAKLOG.bat file that will print the last NT Backup Log file to the specified printer.

@echo off
setlocal
if {%1}=={} @echo Syntax PrintDevice (\\Server\Printer)
set device=%1
set prt=N
for /f "Tokens=*" %%i in ('dir /o-d /b "%userprofile%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\backup*.log"') do call :print %%i
endlocal
goto :EOF
:print
if not "%prt%" EQU "N" goto :EOF
set prt=Y
"C:\Program Files\Windows NT\Accessories\wordpad.exe" /pt "%userprofile%\Local Settings\Application Data\Microsoft\Windows NT\NTBackup\data\%1" %device%

There is also a notepad /p [filename] OR wordpad /p [filename] to send output to the default printer should you need it.

Thursday, August 26, 2010

IPCop 2.0 - Withered on the Vine?

Our friends who have worked so hard on the IPCop system seem to have run out of steam - whether it is a lack of community support (the project is too much for one man, I'm certain), or an over-crowded roll-your-own firewall space (pfSense, UnTangle, Shorewall, and M0n0wall, to name the more popular distributions), I'm not certain.  What I am certain of is that the others have continued development where IPCop has stalled.

I've had repeated issues with unstable 3rd party addons (Squid and Squidguard addons called AdvProxy and URLFilter), but have otherwise been happy with IPCop.  What is spurring my move is not performance (though I think I can see some performance improvements when using other distros - I wish I had a good metric!) but the ability of the firewall to handle client VPN traffic such as a user inside of the network connecting via PPTP to a remote network - iptables apparently can't handle such a situation and won't allow the connection.

I will be reviewing pfSense, but more info on UnTangle and the others would be nice - what do you think of these?

/Update 11-Apr-11


A new IPCop 2.0 Beta has been released!  Visit http://sourceforge.net/projects/ipcop/files/IPCop%20Test%20Versions/ and try it out - don't put it on a production box as many features are incomplete but it is in a quite useable condition!


One thing that I've realized:  when comparing IPCop and pfSense it's important to consider the that the projects have different targets for their user base - IPCop is aimed at the small office/home office and pfSense is aimed at the big boys - the end products reflect this in their ease of configuration and available configuration options.

Wednesday, July 07, 2010

Installing Agris Software on Windows 7 64-bit

I contacted John Deere about Agris and asked whether they supported installing the current version of their software on Windows 7 64-bit edition.  They had said that it would work under Windows 7 after the next update (I think he said R15) but it would not be supported in the 64-bit Windows 7.

Don't forget that there is an XP Mode, and the system runs fine when it is in XP Mode!  Visit Microsoft's XP Mode Download Page and install it per the instructions on the Microsoft site.  Next find and run Windows XP Mode under the Windows Virtual PC Folder in your Start Menu.  The XP Mode initially uses an IP Address that cannot reach your Agris server so you will need to then go to the Menu Bar and Select Tools -> Settings ->  Networking then select Adapter 1 and change it to your wired or wireless network adapter depending on how you connect to your Agris server. 

This is an XP Virtual Machine, an imaginary computer within your computer - use it just like you did XP, map the network drive and install Pervasive SQL, Agris, and the Agris updates.  Run Agris from the XP Mode desktop and verify that it functions properly.

You will need to add any printers to the XP Mode using the traditional methods available to XP users.

Working?  Good!  Select CTRL+ALT+Delete from the XP Mode menu bar and select Shutdown.  Go to Start -> All Programs -> Windows Virtual PC -> Windows XP Mode Applications and you will see an Agris shortcut - copy it to your desktop for a quick way to run Agris without the apparent hassle of running the XP Virtual Machine.

Wednesday, June 09, 2010

W3SVC Log Files are Filling Up Your SBS's System Drive

I can't believe that I haven't encountered this sooner:  The system drive on an SBS 2003 was full.  I used my trusty SequoiaView and found that the W3SVC1 folder was 6.14GB - OUCH!  A quick Google search yielded an excellent discussion of how to deal with the matter.


At a command prompt enter this all on one line:


at 12:00 /EVERY:Su Forfiles.exe -p C:\WINDOWS\system32\LogFiles\W3SVC1 -m *.log -d -30 -c "Cmd.exe /C del @path\" 


This will schedule a job that will run every Sunday and remove W3SVC1 log files that are >30 days old.


Thanks to Tom Watson for posting this gem!

Tuesday, June 08, 2010

"Power Outage"-Proof Your Mac

Ah, spring has sprung, the flowers are making me sneeze, and the birds are singing way too loud, way too early.  Spring showers have brought not only May flowers but frequent power failures that have rendered my lovely Mac unavailable when I'm out and about.  "This moron needs an UPS!" you say - I've been a little slow on the uptake, I'll admit, and after an entire life without one I've been aggravated enough to plunk down my $100 and get one.  I'm definitely not proud that I've gone for so long without one - it's been on the list, but it's always been put off then remembered the next time the power went out.

I opted for a unit from CyberPower because it said that it supported Mac and was $30 cheaper than a comparable model from APC.  I've always gone with APC and Tripp-Lite for my customers because, frankly, I don't know and trust CyberPower like I do the the other two.  But $30 is enough to convince me to try it, and it's my own computer, so noone but me will be aggravated when it breaks.  Hopefully I'm in for a pleasant surprise and the unit will be higher quality that I anticipated.

I plugged in the new unit (CyberPower 850VA model CP850AVRLCD), plugged in all my cords and wall warts (Linux box and iMac on the battery side, router, switch, and WAP on the surge only side), plugged it in, hooked up the USB cord to my iMac, and was pretty much done.  Surprisingly enough, OS X comes with built-in UPS management software that is under Apple -> System Preferences -> Energy Saver -> UPS tab.

But what about my open programs?  I want to run VirtualBox and save the state of the machine if my computer gets interrupted.  Safe Sleep seems like a good bet - it functions in MacBooks iMacs like Hibernate does in PC's - the contents of the RAM are saved to the HDD and the computer goes to sleep, powering the RAM and ready to wake in a moments notice.  If power is interrupted there is no loss because the RAM was saved to the hard drive and it is simply recovered the next time the computer powers up.  It's helpful to set your "Start up automatically after a power failure" option under Energy Saver so that can pick up where it left off automatically.  There is no Safe Sleep or hibernate function available on iMacs out of the box, but SmartSleep fixes that.  Download it, install it, then set your sleep state to Sleep & Hibernate.  I tested this by opening some apps, putting my iMac to sleep, pulling the plug, plugging it back in, and feeling the joy.

Next you will go to the UPS settings under Energy Saver and set your Computer Sleep to a sane amount of time.  5 minutes to 1/2 hour depending on how big your UPS is.  I've opted for safety and went with 5 minutes.   DO NOT go the extra step and configure any shutdown options - this will quit your programs and shut down.

Your computer will now go to sleep with the RAM contents saved after it has been on battery for the time you set.  If the battery runs out of juice the computer goes off.  When power is restored the computer comes back on.  Hopefully the power remains on for a while and allows the battery to recharge because too soon a repeat outage and your sleep timeout won't be reached before it's cut off.

Friday, April 02, 2010

How to find out which user is using which computer on a Windows domain.

Provided you have access to the domain controller this can be easy.  If you don't it gets a bit more complicated.

If you are on the domain controller then you may use your Security Event Logs.  I don't know about you, but the Security Logs are the last place I want to dig for information.  If the user in question is using shares on the server you will be presented with the username and IP's of computers accessing those shares.  On your server go to Computer Management (right-click My Computer, select Manage) and drill down System Tools -> Shared Folders -> Sessions.

If you don't need to know immediately, but you desire a log of login/logoff times.  Free Windows Network User Accounting is the tool for the job.  Though it is a bit of a challenge to set up, it's worth the effort.  This web interfaced system is useful in finding out who is currently logged in and which computer they are using.  The log is never cleared unless you clear it, so the history of who used which computer when can provide a lot of insight.

If you only have access to the local computer then checking the Security Event Log and checking the last modified times of the folders in c:\documents and settings\ can provide important clues.


If you are using NetBIOS (which is becoming less and less common) and you know the user's computername or IP address then you can use your trusty command prompt.

nbtstat -A [target ip address]
nbtstat -a [netbios name]

Wednesday, March 24, 2010

32 Bit ADPrep for Migration to Server 2008

There's a lot of misleading/frustrating information out there regarding where to find a 32 bit version of ADPrep.  Allow me to define the problem:  http://www.petri.co.il/windows-server-2008-adprep.htm (excellent info!) states that the Server 2008 DVD is strictly 64 bit and and will not run on a 32 bit server.  One must download the 32 bit evaluation version of Server 2008 then extract the \support\adprep folder to some medium that is then mounted on your Win2k (or Win2k3) server and executed.

I didn't want to download a massive ISO and extract files, etc. as I'm on a T1 and time is of the essence.  I checked the Server 2k8 DVD's \support\adprep folder and found a adprep32.exe - woohoo!  Copy the adprep folder to something that is mountable on your old server, execute adprep32 instead, and feel the joy!

Tuesday, February 23, 2010

AT&T Global Dialer and Verizon Access Manager Don't Get Along

If you use Verizon as your cellular Internet provider and you are going to install and use the AT&T Global Dialer on your computer you may run into some issues.  Typically users who have Verizon Access Manager (VZAccess) installed cannot install AT&T Global and get it working - it will stop installing then roll back the install.  In some cases it also prevents VZAccess from functioning properly even though it was removed.

This has to do with the way AT&T Global Dialer inserts itself in the network stack - their process is messy and dangerous to put it nicely.

So you've installed AT&T and now VZAccess doesn't work?  Uninstall AT&T Global  if it managed to install, uninstall VZAccess, then restore your system to a point prior to the installation of AT&T' Global.  Once the system restore is finished you may reinstall VZAccess and it whould work.

So you can't live without AT&T Global?  You will need to download the installation app, but don't install it yet.  Uninstall VZAccess, reboot, THEN install AT&T.  Once AT&T is safely installed and your system has been rebooted you may then install VZAccess.

Do not taunt AT&T Global Dialer.

Wednesday, February 17, 2010

Server 2003 Enterprise Edition R2 x64 Terminal Server Software Installation/Uninstallation Slow

Link goes to post that helped the most (I don't make this stuff up myself)!

I found that my Server 2003 x64 Enterprise Terminal Server was taking a stupid long time to install and remove applications.  It was making me crazy!  This server has 1TB of hdd space (500+GB free), hardware RAID (with a battery, so write-back wasn't an issue), dual Quad-Core Xeon's, and 8GB of RAM.  Everything I installed took an eternity (7-Zip took 45 minutes!)

After much reading I found a forum post saying that someone had used Process Explorer while removing software and was seeing huge amounts of data being copied out of the registry that contained Hewlett-Packard in its key.  Further searches have found that when users connect to a Terminal Server and fallback drivers are configured it will try to install the users print drivers in the server, fail, go for the fallback driver, then never remove the installed (nonworking) driver info from the registry.

All the extra info in the registry was being read and written to a backup of the registry during software installs, taking a really long time.  Deleting these keys and their subkeys fixed the trouble.

REMEMBER TO BACK YOUR REGISTRY UP BEFORE MAKING CHANGES TO IT!

[HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Terminal Server\Install\RefHive\Hewlett-Packard]

[HKEY_USERS\.DEFAULT\Software\Hewlett-Packard]



Reboot and feel the joy!

Wednesday, February 10, 2010

Intalling IPCop + USB Keyboard = Headache

Link goes to a bug report in the ipcop-devel board.

IPCop 1.4.20 has trouble installing on computers with USB keyboards - on mine it was sticking at the blue screen just prior to the language selection dialog.  Unfortunately many new computer don't come with PS/2 ports, so USB is a must.

If you unplug your USB keyboard after hitting ENTER to start installation it will start properly (minor errors regarding the keyboard will be seen in the boot messages).  When you see the language dialog you may plug in the keyboard, wait a few seconds (I press the NumLock to see if the light toggles) then proceed normally.