Uninstall ALL Versions of WinZip Batch Script

I have been struggling with this for quite a while, and ran into a lot of issues with all of the different versions on our network. There are people with 100 line .vbs scripts to do this, and I think this is much simpler:

@echo off
REM
REM
REM    Detects winzip and silently uninstalls
REM    There is a un-stoppable pop-up window. so this will kill
REM    all instances of  IE after the UN-installation.
REM
REM
REM
taskkill /F /IM wzqkpick.exe
wmic product where "name like '%%winzip%%'" call Uninstall
REM
REM This section is for WinZip <12
REM
If Exist "%programfiles(x86)%\Winzip\winzip32.exe" GOTO 64
If Exist "%programfiles%\Winzip\winzip32.exe" "%programfiles%\WinZip\Winzip32.exe" /Uninstallx
taskkill /F /IM iexplore.exe
GOTO :END
:64
"%programfiles(x86)%\WinZip\Winzip32.exe" /Uninstallx
taskkill /F /IM iexplore.exe
:END

For getting rid of WinZip 12, the magic happens in the ‘wmic’ line. It searches all of the installed product’s names for “winzip” and will uninstall anything it finds. This only works for products that use MSI’s. If you ran this outside of a batch file, you will have to use a single % percentage sign instead of the %% double percentage sign… Windows scripting sucks, and that’s just the way it is. Same thing that happens in “FOR” loops.

I never knew anything about the Windows management instrumentation control (wmic) until now, but I will be sure to exploit it’s features.

Posted in windows | Tagged , , , , , , , | Leave a comment

Tethered Blackberry Modem on Ubuntu Karmic

Using your blackberry as a 3G (in my case) modem proved to be Incredibly simple. There are five million different methods to do this and many have you compiling stuff and editing text files. I love those sorts of things, but this is much easier. I Wish that I had tried this sooner.

**Confirmed using Blackberry Tour (9630) on Verizon. **

What we will do is use a program called ‘barry’. http://www.netdirect.ca/software/packages/barry All we need to do is install some packages from the repository below. These commands are from the terminal, so launch it from “Applications -> Accessories -> Terminal” in the Menu.

Edit /etc/apt/sources.list

sudo nano /etc/apt/sources.list

add these lines:

deb http://ppa.launchpad.net/doctormo/barry-snapshot/ubuntu karmic main
deb-src http://ppa.launchpad.net/doctormo/barry-snapshot/ubuntu karmic main

install the repositories key.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 113659DF

Now update your package list

sudo aptitude update

and install the programs:

sudo aptitude install libbarry0 barry-util barrybackup-gui

Thats it! now to create the connection, the command will vary depending on your provider. The ones they have preconfigured are: ATT Cingular, China Mobile, KPN Nederland, O2 Ireland, Rogers, Sprint, T-Mobile US, Verizon.
the syntax is :
sudo pppd call barry-{provider}

for Verizon:

sudo pppd call barry-verizon

You’ll see a bunch of output, and it’ll tell you that the connection is up. to close it down, press (CTRL+C). Make it pretty by creating an application launcher on your desktop.

Posted in Ubuntu Karmic | Tagged , , , , , | 9 Comments

Compiz desktop in Debian Squeeze

Getting compiz running on squeeze is surprising easy. Debian has included a document to help set it up, but there are a few little things necessary to get it to be usable.

1. Get the packages installed.

apt-get install compiz compizconfig-settings-manager compiz-fusion-plugins-main

2.Follow the instructions here:  http://wiki.debian.org/Compiz to customize your /etc/X11/xorg.conf file

3. restart gdm

/etc/init.d/gdm restart

4. open up a terminal and type

compiz --replace

5. If a went well, you should see everything flash around as it redraws your desktop.

6. My window decorations (title bars) dissapeared when I enabled compiz. Additionally, i couldn’t drag windows by clicking on the title bar. To fix this: go to

a. System -> Preferences -> Compizconfig Settings Manager
b. Scroll down to the “Effects” section and enable “Window decoration”
c. Scroll down to “Window Management” and enable “Move Window”

7. If you want to use the desktop cube and/or workspaces, you will need more than the single or dual workspaces provided by default.

a. System -> Preferences -> Compizconfig Settings Manager
b. Click “General options”
c. Select the “Desktop size” tab.
d. Set the “Horizontal Virtual size” to whatever you want. For a cube… 4

8. If you want compiz to start automatically with GNOME:

Add “compiz –replace” to “Desktop -> Preferences -> Sessions -> Startup Programs”

Posted in Debian Squeeze, Linux | Tagged , , , , , , | 4 Comments

Vmware – Unable to change virtual machine power state: Internal error.

Ran into this while running Vmware Workstation under Ubuntu Jaunty. I got an error while shutting down the machine through an NX session.

This is a result of a zombie ‘vmware-vmx’ process running. All you need to do is kill the process. This command sends ’signal 9′ to the process. When sent to a program, SIGKILL causes it to terminate immediately. In contrast to SIGTERM and SIGINT, this signal cannot be caught or ignored. For more information: more sigkill info.

killall -s9 vmware-vmx

After that, I was able to start up the virtual machine without issue.

Posted in Linux, Ubuntu, VMware | Tagged , , , , , , , , | Leave a comment

Linux command line bandwidth monitor

You can find out how much bandwidth your linux machine is using with a simple tool called “bwm-ng”. In Debian, install it with

aptitude install bwm-ng

Then, just type ‘bwm-ng’ in the command line. It will give you something like this:

bwm-ng v0.6 (probing every 5.000s), press 'h' for help
  input: /proc/net/dev type: rate
  -         iface                   Rx                   Tx                Total
  ==============================================================================
               lo:           0.00 KB/s            0.00 KB/s            0.00 KB/s
             eth0:        2221.47 KB/s           48.13 KB/s         2269.60 KB/s
  ------------------------------------------------------------------------------
            total:        2221.47 KB/s           48.13 KB/s         2269.60 KB/s

Pressing the “h” key while it is running wil actually pull up a nice menu to change some of the options you are looking at.

bwm-ng is very basic, “iptraf” is another tool that provides some more functionality if you want to drill further into what is moving in and out of your box.

Posted in Linux | Tagged , , , , , | Leave a comment