Boot USB Drive in QEMU under Windows

Hooray! I did it!
I have managed to boot my bootable usb pendrive (BackTrack 3) under QEMU within Windows XP.

For those of you who want the magic one liner here you are:

qemu.exe -L . -m 512 -std-vga -hda \.PhysicalDrive2 -soundhw all -localtime -M pc -kernel ../../boot/vmlinuz -initrd ../../boot/initrd.gz -append "root=/dev/ram0 rw initrd=../../boot/initrd.gz ramdisk_size=6666 vga=0x317"

* This gives you TextMode with 512 MB Ram and Mouse Support!!
* You will need to change PhysicalDrive2 to what ever drive number your USB key is. (Hint look under the DiskManagment snap-in)
* You require administrative rights also
* My Qemu directory lives under USBDriveLetterBT3QEMU FYI
* QEMU Version Win32 PreCompiled 0.9.1

Hopefully this saves you a few hours

Locked down Terminal Server need command prompt

Part of works server migration has meant that we are working on a new Terminal Server. I liked the old one better because:

It had a run command
I could view the system drives
I could type H: in the address bar and it worked!
It had command prompt access!
No firefox installed (Hardened IE installed! OMG WTF!)

And the list goes on….. What I find mose stupid is a work for an IT company and they lock the shit down which make us less productive!!

Anyway I got bored and hacked up a batch file that acts as a command prompt, now pretty much every Terminal Server will allow notepad access, so copy and paste this a save a .bat

@ECHO OFF
ECHO Please type your command:
set /p command=
%command%
pause

As for the Firefox issue, get your bum down to portableapps.com and download portable firefox and install it in your home directory ;-)

Happy pinging (or what ever you do)

Clear Print Queue via Batch Script

Had a client whose print queue would jam up and they couldn’t restart the printer spooler until you manually cleared the spooled documents. So I stole this piece of code and put it in a batch file. Works wonders!

@echo off
net stop "print spooler"
del /q "%SystemRoot%system32spoolPRINTERS*.*"
net start "print spooler"

Update: The reason the spooler was dying was because when he printed a PDF document he would close Acrobat before the document finished and in turned killed the Print Spooler. Because we charge by the hour, he didn’t want it to be investigated any further, which is fine by me!

How to troubleshoot Blackberry Sync error 0×80040FB3

Basically the long story short, You have a bad (or perhaps multiple) Calender, Task, Contact or Memo entry in Outlook which the Blackberry can’t handle. The only way to fix it without start from scratch is to remove those entries. To do that you need to enable logging by:

·For Windows® 2000 or Windows® XP
C:Documents and SettingsApplication DataResearch In MotionBlackBerryIntellisync

·For Windows Vista™ and Windows 7
C:UsersAppDataRoamingResearch In MotionBlackBerryIntellisync

1. Open the iloptcfg.cfg file using Notepad.
2.Change the MultiJobTraceLog value to 200 (the default is 1). This setting generates the PTTrace.log file.
3.Change the TifLog value to 100 (the default is 0). This setting generates the tif.log file. The setting TifLog may need to be added under the [ilwin] section if it does not exist when using BlackBerry Desktop Software 6.0.
4.Save and close the file.
5.Try to sync when it fails review the last entry of tif.log and then delete that entry. Rinse and repeat. I had to remove over 40 calendar entries for a client once, so it’s quite painful. But when you have no options left, you have to do what you have to do…

Reference Link