Wednesday, August 27, 2008

IT Rant II : Disk Imaging

If you have many computers, then you probably dread the time of year where you have to refresh their configurations. There are so many solutions available, but the ones that work and are simple to use are few and far between. Ghost 11 is not one of those programs, and neither is NetInstall for OS X 10.4.11. Ghost 11 would not clone Windows x64 nor regular XP sp3 (it worked for me before with Vista). I have gotten NetInstall to work in the past, but there was some issue with System Image utility failing to copy files. It looks like Apple has done a half ass job of updating OS X once again. I should have upgraded to Leopard server... I guess it's back to my reliable friend disk utility for restores until that happens.

Recently, my disk masters have reached very great sizes -- 100GB and up. This becomes a matter of give and take, because I want to do all my setups on the master. However, by doing so, I am creating images that are far too large. If I have sample files and/or programs that can be copied later, then this is the thing to do. I can copy the files with for loops like so:

Mac -
for ((i=1;i<21;i++))
do
scp somefile mylogon@station${i}.local:samples #make sure you copy the public key from ssh-keygen
done # to each station in ~/.ssh


Windows-
for /l %a in (1,1,20) do copy samplefile.txt \\station%a\c$\samples

There are all kinds of ways to simplify network tasks, but this still doesn't give us an excuse to procrastinate when building disk images. Try and do everything that is to be cloned in the master. Also, try to save space.

Friday, August 1, 2008

Yes, you can script anything I - vbscript: sendkeys, stdout

What happens when you want to automate some configuration and you can't find the command line equivalent, the registry setting eludes you, and the apis to do the task seem too elaborate? Well just do it with it a few key strokes, but have vbscript do the operations for you. It's like doing a macro in excel or your favorite application.

Check out this link for the sendkeys method in wsh.

A lot times I am frustrated by trying to get Windows to act like Unix. When I want to do some string processing, it seems easier just to use vbscript and call the commandline from there. You can collect the information from stdout with the WScript.Shell object.

Check out this example.

IT Rant I - Viruses and malware running amok

Every week I find myself cleaning off someone's machine. Typically, the cleaning process starts with booting into safe mode and running an antivirus scan. Also, cleaning out the registry and startup regions with autoruns. These are steps that may be followed after trying a system restore. The problem with a system restore is that you have to run an antivirus scan anyway, just to be sure.

Recently, I met some particularly annoying viruses such as Graybird, XP Security Center (also known as XP Antivirus 2008), and some others. I'm not sure which one it was, but it removed the svchost. I couldn't use the taskbar, start menu, read event log messages, copy files, or start internet explorer. It looks like the dllcache was emptied too, since sfc /scannow didn't work. It seems Windows users should just be locked down. Let's just give them a simple finder shell.