<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>SurlyJake &#187; scripts</title>
	<atom:link href="http://www.surlyjake.com/tag/scripts/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.surlyjake.com</link>
	<description></description>
	<lastBuildDate>Fri, 30 Dec 2011 15:28:12 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Uninstall ALL Versions of WinZip Batch Script</title>
		<link>http://www.surlyjake.com/2009/10/uninstall-all-versions-of-winzip-batch-script/?utm_source=rss&#038;utm_medium=rss&#038;utm_campaign=uninstall-all-versions-of-winzip-batch-script</link>
		<comments>http://www.surlyjake.com/2009/10/uninstall-all-versions-of-winzip-batch-script/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 20:43:34 +0000</pubDate>
		<dc:creator>jacob</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[batch script]]></category>
		<category><![CDATA[install]]></category>
		<category><![CDATA[script]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[taskkill]]></category>
		<category><![CDATA[windows management instrumentation]]></category>
		<category><![CDATA[wmic]]></category>

		<guid isPermaLink="false">http://www.surlyjake.com/?p=545</guid>
		<description><![CDATA[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   [...]]]></description>
			<content:encoded><![CDATA[<p>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 <a href="http://www.surlyjake.com/tag/scripts/" class="st_tag internal_tag" rel="tag" title="Posts tagged with scripts">scripts</a> to do this, and I think this is much simpler:</p>
<pre><code>@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
<a href="http://www.surlyjake.com/tag/taskkill/" class="st_tag internal_tag" rel="tag" title="Posts tagged with taskkill">taskkill</a> /F /IM wzqkpick.exe
<a href="http://www.surlyjake.com/tag/wmic/" class="st_tag internal_tag" rel="tag" title="Posts tagged with wmic">wmic</a> 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</code></pre>
<p>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... <a href="http://www.surlyjake.com/tag/windows/" class="st_tag internal_tag" rel="tag" title="Posts tagged with windows">Windows</a> scripting sucks, and that's just the way it is. Same thing that happens in "FOR" loops. </p>
<p>I never knew anything about the <a href="http://www.surlyjake.com/tag/windows-management-instrumentation/" class="st_tag internal_tag" rel="tag" title="Posts tagged with windows management instrumentation">Windows management instrumentation</a> control (wmic) until now, but I will be sure to exploit it's features. </p>
<div class="none"><div class="g-plusone" data-href="http://www.surlyjake.com/2009/10/uninstall-all-versions-of-winzip-batch-script/" size="standard" count="true"></div></div>]]></content:encoded>
			<wfw:commentRss>http://www.surlyjake.com/2009/10/uninstall-all-versions-of-winzip-batch-script/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

