Skip to main content

Posts

List all installed applications in a machine

The script below will list and save all installed applications to a csv file. Save the script as say, save.vbs. Set objFSO = CreateObject("Scripting.FileSystemObject") Set objTextFile = objFSO.CreateTextFile("c:\software.csv", True) strComputer = "." Set objWMIService = GetObject("winmgmts:" _ & "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2") Set colSoftware = objWMIService.ExecQuery _ ("Select * from Win32_Product") objTextFile.WriteLine "Caption" & vbtab & _ "Description" & vbtab & "Identifying Number" & vbtab & _ "Install Date" & vbtab & "Install Location" & vbtab & _ "Install State" & vbtab & "Name" & vbtab & _ "Package Cache" & vbtab & "SKU Number" & vbtab & "Vendor" & vbtab _

Dump PE format string resource

Code below can be used to dump PE string resource using python. import os import re import pefile #http://code.google.com/p/pefile/ import sys def DumpStr(fname): try: pe = pefile.PE(fname) except: print sys.exc_info()[0] print "Continue to the next exe/dll" return # The List will contain all the extracted Unicode strings # strings = list() # Fetch the index of the resource directory entry containing the strings # try: rt_string_idx = [ entry.id for entry in pe.DIRECTORY_ENTRY_RESOURCE.entries].index(pefile.RESOURCE_TYPE['RT_STRING']) except (ValueError,AttributeError): return # Get the directory entry # rt_string_directory = pe.DIRECTORY_ENTRY_RESOURCE.entries[rt_string_idx] # For each of the entries (which will each contain a block of 16 strings) # for entry in rt_string_directory.directory.entries: # Get the RVA of the st

Mouse Invisible in VirtualBox guest

In VirtualBox 3.0.2, I have noticed that most of the times the mouse goes invisible on text areas. For example, if you are in Notepad, once you starting writing some text in the text area the mouse pointer goes into the black hole. The work around is really easy. Go to (Windows XP) Control Panel –> Mouse –> Pointers, then select Windows Black (system scheme). ~ts

Partimage invalid compression level workaround

For some reason, some diskimages created using partimage will encounter "invalid compression level" when restored. See below for the workaround to restore the image back. #: ntfs-3g /dev/sda1 /mnt/windows #: mv /mnt/windows/img/vista.img.000 /mnt/windows/img/vista.img.gz #: gunzip -c /mnt/windows/img/vista.img.gz | partimage restore /dev/sda1 stdin ~ts

Installing Easy Peasy in EEE PC 900 using external hard drive

Easy Peasy is a linux distribution tuned for EEE PC (Asus Netbook) computers. http://www.geteasypeasy.com/ http://www.kernel.org/pub/linux/utils/boot/syslinux/ D:\Software\iso\syslinux\win32>syslinux.exe -m -a -d / i: -f Working with swapfile http://ubuntuforums.org/showthread.php?t=1042946&highlight=swapfile Swappiness https://help.ubuntu.com/community/SwapFaq#Performance%20tuning%20with%20%27%27swappi ness%27%27