<?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>Ardamis &#187; Windows 7</title>
	<atom:link href="http://www.ardamis.com/tag/windows-7/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.ardamis.com</link>
	<description>Ardamis is a blog about web development and technology in general.</description>
	<lastBuildDate>Sat, 04 Feb 2012 15:26:27 +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>Native Windows compressed folders utility fails, asks for 5.99 PB free space</title>
		<link>http://www.ardamis.com/2011/07/28/native-windows-compressed-folders-utility-5-99-pb/</link>
		<comments>http://www.ardamis.com/2011/07/28/native-windows-compressed-folders-utility-5-99-pb/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 16:58:21 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=1623</guid>
		<description><![CDATA[Extracting certain large zip files using Windows' native compression utility fails with a pretty neat error: You need an additional 5.99 PB to copy these files.]]></description>
			<content:encoded><![CDATA[<p>The other day, I needed to extract a 7 GB zip file containing a VMware virtual machine onto the hard drive of a nearly stock 64-bit Windows 7 Professional machine.  Because this machine did not have a third-party compression utility installed, I tried to extract it using Windows&#8217; native zip utility, called Compressed Folders.</p>
<p>This failed with a pretty neat error.</p>
<div id="attachment_1638" class="wp-caption aligncenter" style="width: 489px"><a href="http://www.ardamis.com/wp-content/uploads/2011/07/you-need-an-additional-5.99-PB-to-copy-these-files.jpg"><img src="http://www.ardamis.com/wp-content/uploads/2011/07/you-need-an-additional-5.99-PB-to-copy-these-files.jpg" alt="" title="You need an additional 5.99 PB to copy these files." width="479" height="299" class="size-full wp-image-1638" /></a><p class="wp-caption-text">You need an additional 5.99 PB to copy these files.</p></div>
<p>As you can see in the screenshot above, Windows reported that&#8230;</p>
<blockquote><p><strong>Copy Folder</strong></p>
<p>There is not enough space on Local Disk. You need an additional 5.99 PB to copy these files.</p>
<p>Local Disk<br />
Space free: 125 GB<br />
Total size: 232 GB</p>
<p>[Try Again] [Cancel]
</p></blockquote>
<p>I found the 5.99 petabyte requirement pretty amusing, but I was in a hurry, so I downloaded the excellent <a href="http://www.7-zip.org/">7-Zip</a>, unpacked the file, and set about building the vm.</p>
<p>I had meant to write a post about the error message, but some time passed and I forgot all about it.  Then, about three weeks later, someone else in the department tried to extract a copy of the file on a 32-bit Windows XP Professional machine and got the same error.  At that point, I had to investigate.</p>
<p>The Compressed Folders native Windows utility seemed to be unable to accurately calculate the free space needed to extract the file.  The file was admittedly pretty large, but was size the only reason?</p>
<p>According to the <a href="http://en.wikipedia.org/wiki/ZIP_(file_format)">Wikipedia page on ZIP files</a>, there are a number of known limitations of Compressed Folders.</p>
<blockquote><p>ZIP64, AES Encryption, split or spanned archives, and Unicode entry encoding are not known to be readable or writable by the Compressed Folders feature in Windows XP or Windows Vista.</p>
<p><a href="http://en.wikipedia.org/wiki/ZIP_(file_format)#Windows_compressed_folders">http://en.wikipedia.org/wiki/ZIP_(file_format)#Windows_compressed_folders</a></p></blockquote>
<p>None of these things applied to my file, but I found a rather telling and simultaneously ambiguous (go figure) KB article at Microsoft Support: <a href="http://support.microsoft.com/kb/301325">Compressed folder becomes corrupted when larger than 2 gigabytes</a>.</p>
<p>According to various threads, the popular theory is that the problem stems from size limitations on compressed files.  Windows Vista and later have a 4 GB limit (compressed and uncompressed size), while XP has a 2 GB limit.</p>
<p>Strangely, the same error appears before a copy process when the OS encounters a file that exceeds its maximum individual file size, which I can understand, but find a bit confusing in the context of a zip file.  Certainly, both Windows 7 and XP (NTFS) were able to handle the file to begin with, and only had a problem when decompressing it.  </p>
<p>My best guess is that the file was created using the Compressed Folders feature on XP. The file exceeded the maximum size limit for that version of Windows, but due to the bug described in MS KB article 301325, the file was created anyway using 32-bit headers.  When the file was later opened by Compressed Folders, the 64-bit headers were read (as a file of that size would naturally use 64-bit headers), but that information was garbage, preventing Windows from accurately calculating the space required to extract.</p>
<p>If anyone has a more complete understanding of the cause of this error, please leave me a comment.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2011/07/28/native-windows-compressed-folders-utility-5-99-pb/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Fixed: XAMPP Component Status Check failure [3].</title>
		<link>http://www.ardamis.com/2011/07/10/xampp-component-status-check-failure-3/</link>
		<comments>http://www.ardamis.com/2011/07/10/xampp-component-status-check-failure-3/#comments</comments>
		<pubDate>Sun, 10 Jul 2011 18:35:21 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Web Site Dev]]></category>
		<category><![CDATA[mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[troubleshooting]]></category>
		<category><![CDATA[Windows 7]]></category>
		<category><![CDATA[XAMPP]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=1603</guid>
		<description><![CDATA[A simple fix for the XAMPP Component Status Check failure [3]. error when launching the XAMPP 1.7.4 Control Panel.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m running XAMPP 1.7.4 [PHP: 5.3.5] (not as a service) on 64-bit Windows 7 Professional.  </p>
<p>I installed XAMPP to E:\xampp, and I have pinned the XAMPP Control Panel (xampp-control.exe) to the taskbar for easier access, but starting up xampp-control.exe from that shortcut throws an error:</p>
<blockquote><p><strong>XAMPP Control</strong></p>
<p>XAMPP Component Status Check failure [3].</p>
<p>Current directory: E:\xampp</p>
<p>Run this program only from your XAMPP root directory.</p>
<p>[OK] [Cancel]</p></blockquote>
<p>Strangely enough, I even get this error even when running xampp-control.exe from my XAMPP root directory, which really is E:\xampp.</p>
<p>The last post in the thread at <a href="http://www.apachefriends.org/f/viewtopic.php?f=16&#038;t=44320&#038;sid=a41029c6a36bbf5b3bb5817f37842340&#038;start=60">http://www.apachefriends.org/f/viewtopic.php?f=16&#038;t=44320&#038;sid=a41029c6a36bbf5b3bb5817f37842340&#038;start=60</a> offers a simple solution:  change the Install_Dir value under HKEY_LOCAL_MACHINE to point to C:\xampp.  According to the thread, the error message is due to a bug where the Install_Dir is checked against a hard-coded path on C:\.  That may or may not be the case, but the suggested work-around seems to be effective.</p>
<p>Here&#8217;s a registry merge for Windows 7 64-bit that will make the change for you.</p>
<pre class="brush: plain; title: ; notranslate">
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\xampp]
&quot;Install_Dir&quot;=&quot;C:\\xampp&quot;
</pre>
<p>Now xampp-control.exe launches without the error, and I haven&#8217;t noticed anything (PHP, MySQL, etc.) not working because of the bogus path.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2011/07/10/xampp-component-status-check-failure-3/feed/</wfw:commentRss>
		<slash:comments>16</slash:comments>
		</item>
		<item>
		<title>Office 2010 Rearm</title>
		<link>http://www.ardamis.com/2011/05/31/office-2010-rearm/</link>
		<comments>http://www.ardamis.com/2011/05/31/office-2010-rearm/#comments</comments>
		<pubDate>Wed, 01 Jun 2011 03:46:47 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Thriftiness]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[Office]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=1426</guid>
		<description><![CDATA[Delay Microsoft Office 2010 activation for up to 180 days.]]></description>
			<content:encoded><![CDATA[<p>It&#8217;s widely known that Microsoft allows anyone to install and use any version of Windows 7 for 30 days without having to enter a product activation key. By using the <strong>slmgr -rearm</strong> command, this 30-day trial period can be extended three times for a total of 120 days before the installation must be activated to continue functioning.</p>
<p>It is less known, perhaps, that Microsoft has implemented a similar method for delaying the activation of Office 2010 for up to 180 days.  The steps below are from the <a href="http://technet.microsoft.com/en-us/library/ee624357.aspx#section4">Deploy volume activation of Office 2010</a> instructions on <a href="http://technet.microsoft.com">TechNet</a>.</p>
<h2>To rearm your Office 2010 installation</h2>
<ol>
<li>Make sure all Office 2010 applications are closed.</li>
<li>Open an elevated command prompt.</li>
<li>Go to %installdir%\%Program Files%\Common Files\Microsoft Shared\OfficeSoftwareProtectionPlatform. <em>If you installed the 32-bit edition of Office 2010 on a 64-bit operating system, %Program Files% is the Program Files (x86) folder.</em></li>
<li>Run ospprearm.exe.</li>
</ol>
<p>(The italics are mine, as I was tripped up for awhile by looking for ospprearm.exe under C:\Program Files\, rather than the Program Files (x86) folder.)</p>
<p>The Office 2010 rearm delays the activation requirement for 30 days, and it can be used five times, for a total of 180 days of activation-free use.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2011/05/31/office-2010-rearm/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 with SP1 (media refresh)</title>
		<link>http://www.ardamis.com/2011/05/13/windows-7-with-sp1-media-refresh/</link>
		<comments>http://www.ardamis.com/2011/05/13/windows-7-with-sp1-media-refresh/#comments</comments>
		<pubDate>Fri, 13 May 2011 05:32:09 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=1397</guid>
		<description><![CDATA[Update your Windows 7 install media with the 'slipstreamed' Service Pack 1 version.]]></description>
			<content:encoded><![CDATA[<p>Back in February, 2010, I posted instructions on <a href="http://www.ardamis.com/2010/02/13/bootable-windows-7-usb-drive/">how to create a bootable USB drive that can install any version of Windows 7</a>.  As of yesterday, ISOs of updated versions of Windows 7 with SP1 have been made available to Microsoft TechNet and MSDN subscribers.</p>
<p>If you want to update your install media with the &#8216;slipstreamed&#8217; version, grab a torrent and then check it against the <a href="http://technet.microsoft.com/en-us/subscriptions/downloads/default.aspx?pv=36:350">official Windows 7 SHA1 and ISO/CRC hashes</a>.</p>
<p>The filenames for the 5/12/2011 versions of Windows 7 Ultimate are below.</p>
<p>Windows 7 Ultimate with Service Pack 1 (x64) &#8211; DVD (English): en_windows_7_ultimate_with_sp1_x64_dvd_u_677332.iso<br />
(<a href="http://thepiratebay.org/torrent/6391716/Windows_7_x64_SP1_MSDN_Technet_May_2011_Refresh">http://thepiratebay.org/torrent/6391716/Windows_7_x64_SP1_MSDN_Technet_May_2011_Refresh</a>)</p>
<p>Windows 7 Ultimate with Service Pack 1 (x86) &#8211; DVD (English): en_windows_7_ultimate_with_sp1_x86_dvd_u_677460.iso</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2011/05/13/windows-7-with-sp1-media-refresh/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Configuring your network to use faster, more reliable DNS servers</title>
		<link>http://www.ardamis.com/2011/05/11/configuring-your-network-to-use-faster-more-reliable-dns-servers/</link>
		<comments>http://www.ardamis.com/2011/05/11/configuring-your-network-to-use-faster-more-reliable-dns-servers/#comments</comments>
		<pubDate>Thu, 12 May 2011 04:30:05 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[network]]></category>
		<category><![CDATA[router]]></category>
		<category><![CDATA[security]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=1387</guid>
		<description><![CDATA[How to configure your computer or router to use the faster, more reliable DNS servers from OpenDNS or Google Public DNS.]]></description>
			<content:encoded><![CDATA[<p>Typically, your ISP provides DNS services.  In an ideal world, this would work well, as your ISP&#8217;s DNS server ought to be geographically close to your machine and should be able to perform look ups quickly.  However, there are a number of reasons why you might want to use a public DNS server instead of your ISP&#8217;s server.  The two big public DNS servers are OpenDNS and Google Public DNS.</p>
<h2>OpenDNS</h2>
<p>The <a href="http://www.opendns.com/">OpenDNS</a> nameserver IP addresses are:</p>
<ul>
<li>208.67.220.220</li>
<li>208.67.222.222</li>
<li>208.67.220.222</li>
<li>208.67.222.220</li>
</ul>
<p><a href="http://www.opendns.com/support/article/197">http://www.opendns.com/support/article/197</a></p>
<h2>Google Public DNS</h2>
<p>The <a href="http://code.google.com/speed/public-dns/docs/intro.html">Google Public DNS</a> nameserver IP addresses are:</p>
<ul>
<li>8.8.8.8</li>
<li>8.8.4.4</li>
</ul>
<p><a href="http://code.google.com/speed/public-dns/docs/using.html">http://code.google.com/speed/public-dns/docs/using.html</a></p>
<p>So which DNS servers are faster for you?</p>
<p>Try out <a href="http://code.google.com/p/namebench/">namebench</a>. It hunts down the fastest DNS servers available for your computer to use.  (For Mac OS X, Windows, and UNIX.)</p>
<p><a href="http://code.google.com/p/namebench/">http://code.google.com/p/namebench/</a></p>
<h2>Using OpenDNS to filter (whitelist/blacklist) content</h2>
<p>If you have an account with OpenDNS, you can whitelist and blacklist IP addresses.  A free account allows you to whitelist or blacklist 25 addresses; paid accounts allow more.</p>
<ol>
<li>Create an account at OpenDNS.</li>
<li>Set up a network for your physical location (your current IP address).</li>
<li>Configure your machine to use the OpenDNS servers.</li>
<li>Install the client software for updating a dynamic IP in an OpenDNS network &#8211; <a href="http://www.opendns.com/support/article/90">http://www.opendns.com/support/article/90</a>.</li>
</ol>
<ul>
<li>Windows 7 &#8211; <a href="https://store.opendns.com/setup/operatingsystem/windows-7">https://store.opendns.com/setup/operatingsystem/windows-7</a></li>
<li>Ubuntu &#8211; <a href="https://store.opendns.com/setup/operatingsystem/ubuntu">https://store.opendns.com/setup/operatingsystem/ubuntu</a></li>
<li>Mac OS X &#8211; <a href="https://store.opendns.com/setup/operatingsystem/apple-osx-leopard">https://store.opendns.com/setup/operatingsystem/apple-osx-leopard</a></li>
</ul>
<p>Technically more sophisticated users may discover that manually setting the DNS servers on a computer allows that computer to circumvent the OpenDNS filtering.  To prevent a machine from bypassing the OpenDNS filtering, you could configure the DNS servers directly on the router and then block all outgoing DNS requests to all DNS servers except the OpenDNS servers.</p>
<h2>OpenDNS system status</h2>
<p>It&#8217;s a good idea to be able to check the condition of your DNS server.</p>
<p>The <a href="http://system.opendns.com/">OpenDNS system status</a> page&#8217;s IP address is <a href="http://208.69.38.170/">http://208.69.38.170/</a>.</p>
<h2>Seriously restricting internet access</h2>
<p>What I really want to do is severely restrict internet access on a single machine on my LAN.  For this machine, I want to manage a small whitelist of domains and block access to everything else.  OpenDNS doesn&#8217;t seem to offer this type of functionality.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2011/05/11/configuring-your-network-to-use-faster-more-reliable-dns-servers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to clean up those Mac OSX hidden files</title>
		<link>http://www.ardamis.com/2010/08/10/clean-up-those-mac-osx-hidden-files/</link>
		<comments>http://www.ardamis.com/2010/08/10/clean-up-those-mac-osx-hidden-files/#comments</comments>
		<pubDate>Tue, 10 Aug 2010 06:20:19 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Apple]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=941</guid>
		<description><![CDATA[How to delete the hidden files that Mac OSX puts on flash drives, USB hard drives, and other shared storage.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written a simple batch file to remove those hidden files that Mac OSX leaves all over shared drives to annoy us Windows users.</p>
<pre class="brush: php; title: ; notranslate">
del /s /a:h ._*
:: http://en.wikipedia.org/wiki/Resource_fork

del /s /a:h .DS_Store
:: http://en.wikipedia.org/wiki/.DS_Store

del /s /a:h .Trashes
:: http://en.wikipedia.org/wiki/Recycle_bin_(computing)

@pause
</pre>
<h2>How to use</h2>
<p>Copy the code into a text file, rename it <strong>cleanOSX.bat</strong> and run it from the root of the drive you wish to clean.  The script will look through all subfolders, deleting any hidden file or folder with a name that begins with <strong>._</strong>, or that matches <strong>.DS_Store</strong> or <strong>.Trashes</strong>.  Depending on the number of these files on your drive, the process of deleting them could take some time.</p>
<h2>Where do these files come from?</h2>
<h3>The resource fork</h3>
<blockquote><p>The resource fork is a construct of the Mac OS operating system used to store structured data in a file, alongside unstructured data stored within the data fork. A resource fork stores information in a specific form, such as icons, the shapes of windows, definitions of menus and their contents, and application code (machine code). For example, a word processing file might store its text in the data fork, while storing any embedded images in the same file&#8217;s resource fork. The resource fork is used mostly by executables, but every file is able to have a resource fork.<br />
&#8230;<br />
Currently, Mac OS X does support resource forks on Windows SMB shares by creating a hidden file in the same directory with the data fork file, with the characters “._” at the beginning of the file name. However, this may be annoying for some users, especially because some Windows power users always keep hidden files visible. Besides, Windows does not treat those files correctly as the file itself is moved or removed.</p>
<p><a href="http://en.wikipedia.org/wiki/Resource_fork">http://en.wikipedia.org/wiki/Resource_fork</a></p></blockquote>
<h3>The Desktop Services Store</h3>
<blockquote><p>.DS_Store (Desktop Services Store) is a hidden file created by Apple Inc.&#8217;s Mac OS X operating system to store custom attributes of a folder such as the position of icons or the choice of a background image.</p>
<p><a href="http://en.wikipedia.org/wiki/.DS_Store">http://en.wikipedia.org/wiki/.DS_Store</a>
</p></blockquote>
<h3>The Trash folder</h3>
<blockquote><p>Under Mac OS X, when a file is deleted in Finder, it is moved to a .Trashes folder, and when viewing the device&#8217;s available space the space occupied by the deleted files is shown as occupied.</p>
<p><a href="http://en.wikipedia.org/wiki/Recycle_bin_(computing)">http://en.wikipedia.org/wiki/Recycle_bin_(computing)</a>
</p></blockquote>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/08/10/clean-up-those-mac-osx-hidden-files/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Simple file backup with a batch file</title>
		<link>http://www.ardamis.com/2010/08/08/simple-file-backup-with-a-batch-file/</link>
		<comments>http://www.ardamis.com/2010/08/08/simple-file-backup-with-a-batch-file/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 06:30:31 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=910</guid>
		<description><![CDATA[How to write a simple batch file for backing up files to a drive letter and reducing the risk of those files being copied to the wrong device.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written a simple batch file for backing up files and folder onto a different drive letter.  </p>
<p>In my case, the destination drive will be a USB drive.  Even though I&#8217;ve configured Windows to always assign the same drive letter to that device, the possibility remains that I&#8217;ll connect a different drive that will be assigned the same drive letter.  In order to be sure that I&#8217;m backing up to the correct drive, the batch file performs a few checks before copying files.</p>
<p>The first check confirms that a disk exists at that drive letter.  The second check confirms that the path is valid.  The third check looks for the presence of a file in the destination directory.</p>
<p>To use, simply paste the following code into a text file, change the variables to match your environment, add additional <strong>xcopy</strong> lines for other folders, then save it as a .bat file.  Fire the batch file manually, or place it in your startup folder to automatically back up your files each time you log in to Windows.</p>
<pre class="brush: plain; title: ; notranslate">
:: Back up select files and folders to a location that may be an external drive
@echo off

:: Set some variables
set destinationDrive=D:
set destinationPath=backup
Set destination=%destinationDrive%\%destinationPath%
set validationFile=asdf.txt

:: Check to see if the drive is available
if not exist %destinationDrive%\. goto :nodestinationDrive
:: Move to destination drive
%destinationDrive%

:: Check to see if the path is available
if not exist &quot;\%destinationPath%\.&quot; goto :nodestinationPath
:: Move to destination path
cd %destinationPath%

:: Check to see if the validation file exists
if not exist %validationFile% goto :novalidationFile

:: Backup location is valid
@echo The backup location &quot;%destination%&quot; is valid.

:: Copy files and folders if source is newer than destination

:: Desktop
@xcopy &quot;%USERPROFILE%\Desktop&quot; &quot;%destination%\Desktop&quot; /d /e /c /i /q /h /r /k /y

@echo.
@echo Files copied.  Please review output for errors.
@pause
goto eof

:nodestinationDrive
@echo The destination drive &quot;%destinationDrive%&quot; does not exist.
goto :nocopy

:nodestinationPath
@echo The destination path &quot;%destinationPath%&quot; does not exist on drive %destinationDrive%.
goto :nocopy

:novalidationFile
@echo The validation file does not exist.
goto :nocopy

:: No files have been copied
:nocopy
::@echo A valid backup location cannot be confirmed.
@echo No files have been copied.

@echo.
@pause
</pre>
<p>This file works with Windows XP through Windows 7.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/08/08/simple-file-backup-with-a-batch-file/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to programmatically disable Adobe Updater</title>
		<link>http://www.ardamis.com/2010/07/08/how-to-programmatically-disable-adobe-updater/</link>
		<comments>http://www.ardamis.com/2010/07/08/how-to-programmatically-disable-adobe-updater/#comments</comments>
		<pubDate>Thu, 08 Jul 2010 05:22:30 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[downloads]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=734</guid>
		<description><![CDATA[How to disable the 'Automatically check for Adobe updates' feature in various products by programmatically editing or replacing the AdobeUpdaterPrefs.dat settings via batch file.]]></description>
			<content:encoded><![CDATA[<p>By default, the Adobe Updater application that is installed along side various Adobe products like Acrobat and Photoshop is set to check for updates automatically.  Specifically, it&#8217;s set to check for updates to all installed Adobe products every week, and to download all updates and then notify you when they are ready to be installed.  In this post, I&#8217;ll explain how to disable this feature by editing a settings file while avoiding the GUI.</p>
<div id="attachment_736" class="wp-caption aligncenter" style="width: 532px"><a href="http://www.ardamis.com/wp-content/uploads/2010/07/Adobe-Updater-Preferences.png"><img src="http://www.ardamis.com/wp-content/uploads/2010/07/Adobe-Updater-Preferences.png" alt="Adobe Updater Preferences" title="Adobe-Updater-Preferences" width="522" height="477" class="size-full wp-image-736" /></a><p class="wp-caption-text">Adobe Updater Preferences</p></div>
<p>In a managed environment, an administrator may not want any software to update itself for any number of reasons.  The automatic check can be switched off in the Adobe Updater preferences, but it can be a nuisance to find and requires as many as 9 clicks.</p>
<p>Adobe Updater can be launched from within Adobe products by clicking <strong>Help | Check for Updates</strong> (note that in some products, the path is <strong>Help | Updates</strong>, but in either case, you can use the keystroke <strong>Alt+H, U</strong>).  Click <strong>Preferences</strong>, then uncheck the box next to <strong>Automatically check for Adobe updates</strong> and click <strong>OK</strong>, then close the Adobe Updater window.  You may have to click <strong>Quit</strong> in a subsequent window before the application closes.</p>
<p>For a more direct route, the Adobe Updater executable installed with Reader 9 resides at<br />
<strong>C:\Program Files (x86)\Common Files\Adobe\Updater6\AdobeUpdater.exe</strong> on a 64-bit Windows 7 machine, and at<br />
<strong>C:\Program Files\Common Files\Adobe\Updater6\AdobeUpdater.exe</strong> on a 32-bit Windows XP machine.  </p>
<p>All of the configurable settings are saved to a file named AdobeUpdaterPrefs.dat in the user profile, rather than as registry keys.  The .dat file extension suggests a binary file, but it&#8217;s actually just an XML document that can be opened in any text editor.</p>
<p>The preferences file resides at<br />
<strong>C:\Users\[USERNAME]\AppData\Local\Adobe\Updater6\AdobeUpdaterPrefs.dat</strong> on a 64-bit Windows 7 machine, and at<br />
<strong>C:\Documents and Settings\[USERNAME]\Local Settings\Application Data\Adobe\Updater6\AdobeUpdaterPrefs.dat</strong> on a 32-bit Windows XP machine.  </p>
<p>The minimum lines that need to exist for the file to be valid and for &#8220;Automatically check for Adobe updates&#8221; to be disabled are:</p>
<pre class="brush: plain; title: ; notranslate">
&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?&gt;
&lt;AdobeUpdater&gt;
&lt;AutoCheck&gt;0&lt;/AutoCheck&gt;
&lt;/AdobeUpdater&gt;
</pre>
<p>To disable the auto update check programmatically, this file can be saved as AdobeUpdaterPrefs.dat and a script used to later overwrite the file in the user profile.  A rather geekier approach would be to use a batch file to rename AdobeUpdaterPrefs.dat and then write a new file.  I prefer the latter method because it requires only a single file and because it could be easily modified to insert lines that would change other settings, such as the location of the aum.log log file or the download directory, which are located in the user profile by default.</p>
<p>A batch file to back-up and then remake the file might look like this:</p>
<pre class="brush: plain; pad-line-numbers: false; title: ; notranslate">
:: A batch file for writing a new Adobe Updater settings file &quot;AdobeUpdaterPrefs.dat&quot;
:: If an AdobeUpdaterPrefs.dat exists, it is edited and then the next next location is checked, until the script has iterated through all locations
@echo off

%SystemDrive%
cd\
SETLOCAL EnableDelayedExpansion

:: Check each location and if the file is found, pass the directory and a label (to the next path to be searched or to an EXIT command) to the function

:XPUpdater6
@echo.
echo Checking for &quot;%USERPROFILE%\Local Settings\Application Data\Adobe\Updater6\AdobeUpdaterPrefs.dat&quot;
if exist &quot;%USERPROFILE%\Local Settings\Application Data\Adobe\Updater6\AdobeUpdaterPrefs.dat&quot; (call:REWRITE &quot;%USERPROFILE%\Local Settings\Application Data\Adobe\Updater6&quot;,XPUpdater5) else (@echo The AdobeUpdaterPrefs.dat file was not found.)

:XPUpdater5
@echo.
echo Checking for &quot;%USERPROFILE%\Local Settings\Application Data\Adobe\Updater5\AdobeUpdaterPrefs.dat&quot;
if exist &quot;%USERPROFILE%\Local Settings\Application Data\Adobe\Updater5\AdobeUpdaterPrefs.dat&quot; (call:REWRITE &quot;%USERPROFILE%\Local Settings\Application Data\Adobe\Updater5&quot;,OUT) else (@echo The AdobeUpdaterPrefs.dat file was not found.)

:OUT
@pause
exit

:REWRITE
:: Configure Adobe Update to not check for updates
:: Move to the correct directory
cd %~1
:: Delete any temp file that this script may have created in the past
if exist AdobeUpdaterPrefs.dat.temp del AdobeUpdaterPrefs.dat.temp
:: Backup the old file
rename AdobeUpdaterPrefs.dat AdobeUpdaterPrefs.dat.temp
:: Write a new minimum settings file (the other data will be filled in when Auto Updater runs)
echo ^&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
echo ^&lt;AdobeUpdater^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
echo ^&lt;AutoCheck^&gt;0^&lt;/AutoCheck^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
echo ^&lt;/AdobeUpdater^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
:: Rename the new file
rename AdobeUpdaterPrefs.txt AdobeUpdaterPrefs.dat
@echo The AdobeUpdaterPrefs.dat file was found and modified.
:: Go to the next location in the list
goto :%~2
goto :EOF
</pre>
<h2>File locations in Windows 7</h2>
<p>Note that in Windows 7, &#8220;%USERPROFILE%\AppData\Local\&#8221; and &#8220;%USERPROFILE%\Local Settings\Application Data\&#8221; contain the same data.  A file added to a subdirectory in one location will appear in the corresponding subdirectory in the other location.  So this script will work on Windows 7 because of 7&#8242;s backwards compatibility.</p>
<p>If you wanted to the script to run using Windows 7&#8242;s native C:\Users\&#8230; directory structure and did not care about the loss of compatibility with XP, you could use the following script instead.</p>
<pre class="brush: plain; pad-line-numbers: false; title: ; notranslate">
:: A batch file for writing a new Adobe Updater settings file &quot;AdobeUpdaterPrefs.dat&quot;
:: If an AdobeUpdaterPrefs.dat exists, it is edited and then the next next location is checked, until the script has iterated through all locations
@echo off

%SystemDrive%
cd\
SETLOCAL EnableDelayedExpansion

:: Check each location and if the file is found, pass the directory and a label (to the next path to be searched or to an EXIT command) to the function

:WIN7Updater6
@echo.
echo Checking for &quot;%USERPROFILE%\AppData\Local\Adobe\Updater6\AdobeUpdaterPrefs.dat&quot;
if exist &quot;%USERPROFILE%\AppData\Local\Adobe\Updater6\AdobeUpdaterPrefs.dat&quot; (call:REWRITE &quot;%USERPROFILE%\AppData\Local\Adobe\Updater6&quot;,WIN7Updater5) else (@echo The AdobeUpdaterPrefs.dat file was not found.)

:WIN7Updater5
@echo.
echo Checking for &quot;%USERPROFILE%\AppData\Local\Adobe\Updater5\AdobeUpdaterPrefs.dat&quot;
if exist &quot;%USERPROFILE%\AppData\Local\Adobe\Updater5\AdobeUpdaterPrefs.dat&quot; (call:REWRITE &quot;%USERPROFILE%\AppData\Local\Adobe\Updater5&quot;,OUT) else (@echo The AdobeUpdaterPrefs.dat file was not found.)

:OUT
@pause
exit

:REWRITE
:: Configure Adobe Update to not check for updates
:: Move to the correct directory
cd %~1
:: Delete any temp file that this script may have created in the past
if exist AdobeUpdaterPrefs.dat.temp del AdobeUpdaterPrefs.dat.temp
:: Backup the old file
rename AdobeUpdaterPrefs.dat AdobeUpdaterPrefs.dat.temp
:: Write a new minimum settings file (the other data will be filled in when Auto Updater runs)
echo ^&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot; ?^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
echo ^&lt;AdobeUpdater^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
echo ^&lt;AutoCheck^&gt;0^&lt;/AutoCheck^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
echo ^&lt;/AdobeUpdater^&gt; &gt;&gt; AdobeUpdaterPrefs.txt
:: Rename the new file
rename AdobeUpdaterPrefs.txt AdobeUpdaterPrefs.dat
@echo The AdobeUpdaterPrefs.dat file was found and modified.
:: Go to the next location in the list
goto :%~2
goto :EOF
</pre>
<h2>Additional benefits</h2>
<p>Modifying the preferences file could have other benefits as well.  Imagine the time and disk space that could saved by having all of those incremental Adobe updates saved to a network location, rather than downloading them to each workstation.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/08/how-to-programmatically-disable-adobe-updater/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>How to delete Flash cookies (Local Shared Objects)</title>
		<link>http://www.ardamis.com/2010/07/07/how-to-delete-flash-cookies/</link>
		<comments>http://www.ardamis.com/2010/07/07/how-to-delete-flash-cookies/#comments</comments>
		<pubDate>Wed, 07 Jul 2010 05:59:09 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=755</guid>
		<description><![CDATA[How to create a small batch file to delete Local Shared Objects, commonly called Flash cookies.]]></description>
			<content:encoded><![CDATA[<p>In this post, I&#8217;ll explain how to delete files known as Flash cookies from a Windows computer using a batch file.</p>
<p>Most people are familiar with the concept of cookies &#8211; small files saved to your computer by the web sites you visit &#8211; and how to delete them.  But there is a wide-spread misconception that simply deleting your cookies erases your tracks.  Even when you&#8217;ve instructed your browser to delete cookies and browsing history, a potentially large collection of files remains, and the paths to these files contain the domain names of the sites that have placed them on your computer.</p>
<blockquote><p>Local Shared Objects (LSO), commonly called Flash cookies, are collections of cookie-like data stored as a file on a user&#8217;s computer.  LSOs are used by all versions of Adobe Flash Player&#8230;</p>
<p>With the default settings, Adobe Flash Player does not seek the user&#8217;s permission to store LSO files on the hard disk.</p>
<p>There is relatively little public awareness of LSOs, and they can usually not be deleted by the cookie privacy controls in a web browser.</p>
<p><a href="http://en.wikipedia.org/wiki/Local_Shared_Object">http://en.wikipedia.org/wiki/Local_Shared_Object</a></p></blockquote>
<p>The files are saved to two locations in the roaming profile:<br />
<strong>%APPDATA%\Macromedia\Flash Player\#SharedObjects</strong><br />
and<br />
<strong>%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys</strong></p>
<p>As an example, a visit to YouTube will result in the following folders being created:<br />
C:\Users\Oliver\AppData\Roaming\Macromedia\Flash Player\#SharedObjects\98X5KV83\s.ytimg.com<br />
C:\Users\Oliver\AppData\Roaming\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\#s.ytimg.com</p>
<p>Create a text file with the following lines, then save it as <strong>deleteLSOs.bat</strong>.  Run the batch file to delete and remake these folders, thereby clearing all of the subfolders and files.</p>
<pre class="brush: plain; title: ; notranslate">
@echo off
copy &quot;%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\settings.sol&quot; &quot;%USERPROFILE%\Local Settings\Temp\settings.sol&quot;
rmdir /s /q &quot;%APPDATA%\Macromedia\Flash Player\#SharedObjects&quot;
md &quot;%APPDATA%\Macromedia\Flash Player\#SharedObjects&quot;
rmdir /s /q &quot;%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys&quot;
md &quot;%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys&quot;
copy &quot;%USERPROFILE%\Local Settings\Temp\settings.sol&quot; &quot;%APPDATA%\Macromedia\Flash Player\macromedia.com\support\flashplayer\sys\settings.sol&quot;
</pre>
<p>Note that the script backs up and then restores a settings.sol file that contains the Flash Player global settings, which can be managed from <a href="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager03.html">the Flash Player Settings Manager</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/07/how-to-delete-flash-cookies/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Easily batch rename digital images with Advanced Renamer</title>
		<link>http://www.ardamis.com/2010/07/01/batch-rename-images-by-date/</link>
		<comments>http://www.ardamis.com/2010/07/01/batch-rename-images-by-date/#comments</comments>
		<pubDate>Thu, 01 Jul 2010 12:08:29 +0000</pubDate>
		<dc:creator>ardamis</dc:creator>
				<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Microsoft]]></category>
		<category><![CDATA[Nonsense]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[Windows 7]]></category>

		<guid isPermaLink="false">http://www.ardamis.com/?p=681</guid>
		<description><![CDATA[How to batch-rename pictures based on date taken, with incrementing numbers per date.]]></description>
			<content:encoded><![CDATA[<p>I like using the Import Pictures and Videos wizard in Windows 7 when transferring pictures from my digital camera because it can create a separate folder for each date.  But it lacks the ability to rename the individual files based on date.  I want my image filenames to be <strong>YYYY.MM.DD_001.jpg</strong>, where the trailing number increments for that date.</p>
<p>To get the filename just right, I use <a href="http://www.advancedrenamer.com/">Advanced Renamer</a>, a free program for renaming multiple files or folders at once.  Advanced Renamer can read information from the image file (like the date the picture was taken).</p>
<h2>Importing the images</h2>
<p>Connect the device or memory card to your computer.  In the <strong>AutoPlay</strong> dialog box that appears, click <strong>Import pictures and videos using Windows</strong>.</p>
<div id="attachment_687" class="wp-caption aligncenter" style="width: 344px"><a href="http://www.ardamis.com/wp-content/uploads/2010/06/AutoPlay.png"><img src="http://www.ardamis.com/wp-content/uploads/2010/06/AutoPlay.png" alt="Windows 7 AutoPlay dialog box" title="AutoPlay" width="334" height="268" class="size-full wp-image-687" /></a><p class="wp-caption-text">Windows 7 AutoPlay dialog box</p></div>
<p>The default settings will create a single folder with today&#8217;s date, which is not what we want.  To change the settings that are used when importing pictures and videos, click <strong>Import settings</strong> in the <strong>Import Pictures and Videos</strong> dialog box.</p>
<div id="attachment_688" class="wp-caption aligncenter" style="width: 488px"><a href="http://www.ardamis.com/wp-content/uploads/2010/06/Import-Settings.png"><img src="http://www.ardamis.com/wp-content/uploads/2010/06/Import-Settings.png" alt="Windows 7 Import Settings dialog box" title="Import-Settings" width="478" height="541" class="size-full wp-image-688" /></a><p class="wp-caption-text">Windows 7 Import Settings dialog box</p></div>
<p>Under the <strong>Folder name</strong> menu, choose <strong>Date Taken + Tag</strong> and click <strong>OK</strong>.  The import process will restart and you&#8217;ll be prompted to enter a tag.  The tag isn&#8217;t important, so just click <strong>Import</strong>.</p>
<h2>Configuring Advanced Renamer</h2>
<p>It takes two methods to get the names the way I want them.  The first method changes the filename to use the year, month, and day information, and increment a trailing number.  The second method changes the new filename to lowercase.  If you prefer your file extensions to be in uppercase, you can skip the second method.</p>
<div id="attachment_691" class="wp-caption aligncenter" style="width: 456px"><a href="http://www.ardamis.com/wp-content/uploads/2010/07/Advanced-Renamer-renaming-methods.png"><img src="http://www.ardamis.com/wp-content/uploads/2010/07/Advanced-Renamer-renaming-methods.png" alt="Advanced Renamer - Renaming method list" title="Advanced-Renamer-renaming-methods" width="446" height="508" class="size-full wp-image-691" /></a><p class="wp-caption-text">Advanced Renamer - Renaming method list</p></div>
<p>Under <strong>Add batch method</strong>, click <strong>New Name</strong>, and either select the desired date conventions from the options, adding any separator characters you wish, or copy the code below to use <strong>YYYY.MM.DD_001.EXT</strong>.</p>
<pre class="brush: plain; title: ; notranslate">
&lt;IMG Year&gt;.&lt;IMG Month&gt;.&lt;IMG Day&gt;_&lt;Inc NrDir:001&gt;.&lt;Ext&gt;
</pre>
<p>Under <strong>Add batch method</strong>, click <strong>New Case</strong> and then choose <strong>Set lower case</strong>.  In the <strong>Apply to</strong> menu, choose <strong>Name and extension</strong>.</p>
<p>Click the <strong>Add</strong> button and browse to the parent folder.  The files should appear in the list, and the new filename will be displayed.  Check for any errors or problems with the filename, then click <strong>Start Batch</strong>.</p>
<h2>Move the files into a single directory</h2>
<p>Now that the pictures are all correctly named, I no longer need them to be in date-based folders.  It&#8217;s more convenient to have them in a single folder from which I can organize them.</p>
<p>To do this, I use a batch file that moves any files in a sub-folder into the parent folder.</p>
<pre class="brush: plain; title: ; notranslate">
Set sOriginFolder=&quot;PATH\TO\PARENT\DIRECTORY&quot;

For /f &quot;Tokens=*&quot; %%a in ('Dir %sOriginFolder% /a-d /s /b') do (
	move &quot;%%a&quot; %sOriginFolder%
)
</pre>
<p>Replace <strong>PATH\TO\PARENT\DIRECTORY</strong> with the full path to the parent folder, then run the batch file.</p>
<p>That&#8217;s it.  Now I have a single folder of images that are uniquely named according to date taken.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.ardamis.com/2010/07/01/batch-rename-images-by-date/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

