Thursday, January 28, 2010

Delete hiberfil.sys hibernation file in Vista

File is as large as your physical memory which is very large.
Can easily do this is in XP by disabling hibernation however Vista it is more difficult. Do it via command line: powercfg -h off

Wednesday, January 27, 2010

batch file to backup and encrypt to disk

There are times when backing up files to a USB drive is the only method that a client has chosen to perform their backups on their Windows machines. The best way to ensure that that USB is not stolen or lost, and then read, is to encrypt the files. Anyone who knows me knows that I love creating my own scripts and using open software to avoid high priced vendor solutions. Here is a quick process to give the backups some decent security.

Download and install Truecrypt (Excellent open source on-the-fly encryption tool).
Create encrypted volume inside USB (call it "backups" for this exercise)
Make sure you use strong password and remember it or keep it somewhere you can access it again
Download Robocopy (or Rsync)
Batch script:

"c:\program files\truecrypt\truecrypt.exe" /q /s /v e:\backups /lj /a /p password
robocopy C:\Users\Administrator\Documents j:\ *.doc
"c:\program files\truecrypt\truecrypt.exe" /q /dj

(here I create volume j, using weak password called "password" silent mode, don't show GUI, automount volume, then call robocopy to do the backup of .doc files in the Documents directory to the encrypted volume, then unmount volume)

There you have it, a USB thumbdrive with your encrypted files out of view.

Wednesday, January 13, 2010

Cannot copy file access is denied windows XP

Came across this one today; bought 4 new Dell computers and was setting them up. Ok first thing I have to do is copy a directory over from the old computer to thenew machine, half way through the copy and I get cannot copy access is denied.
I try everything, I disable file sharing, turn off firewall and a few other things. I notice that at every reboot Norton asks me to sign up for their trial. Being a new computer and I won't be using it, I just click on "remind me later". Well, could it possibly be Norton stopping this file (I notice it is a .exe file); this could be possible but why since I have told it I don't want to install it.
So I click to uninstall Norton trial offer (which I never accepted) and now everything works. I guess I don't know why Dell puts this on yet it indicates that it is not installed and you have the option to install it when you want. I guess this is incorrect.