<?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>analog feelings, digital world &#187; Windows</title>
	<atom:link href="http://notonlyzeroesandones.site40.net/category/windows/feed/" rel="self" type="application/rss+xml" />
	<link>http://notonlyzeroesandones.site40.net</link>
	<description>code is the modern poetry ;)</description>
	<lastBuildDate>Mon, 05 Oct 2009 22:06:02 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>What have I learned thanks to SyncToy?</title>
		<link>http://notonlyzeroesandones.site40.net/2009/04/14/what-have-i-learned-thanks-to-synctoy/</link>
		<comments>http://notonlyzeroesandones.site40.net/2009/04/14/what-have-i-learned-thanks-to-synctoy/#comments</comments>
		<pubDate>Tue, 14 Apr 2009 11:58:29 +0000</pubDate>
		<dc:creator>Maciek Talaska</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[my projects]]></category>
		<category><![CDATA[c# 3.0]]></category>
		<category><![CDATA[SyncToy]]></category>
		<category><![CDATA[System.IO]]></category>

		<guid isPermaLink="false">http://notonlyzeroesandones.site40.net/2009/04/14/what-have-i-learned-thanks-to-synctoy/</guid>
		<description><![CDATA[If you haven’t used SyncToy – it is high time to check what it can do for you. In short: this is a great synchronization tool, originally written to help photographers (or amateur photographers) synchronize between their studio storage devices (computers) and mobile data banks. I have started using SyncToy to synchronize content on two [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">If you haven’t used SyncToy – it is high time to check what it can do for you. In short: this is a great synchronization tool, originally written to help photographers (or amateur photographers) synchronize between their studio storage devices (computers) and mobile data banks. I have started using SyncToy to synchronize content on two of my disk (I want one of them to be the exact copy of the other one). The disk are quite big (about 200GBs) so doing a “preview” of changes takes a while. Yesterday although, SyncToy was unable to finish preparing preview, because there were some files / folders with invalid chars in their names. The <a href="http://social.microsoft.com/forums/en-US/synctoy/thread/7c9057ef-c4c7-410c-a3c6-50ff0105988d/">problem is known</a> to both sides: SyncToy users and Microsoft’s developers, but suggested solutions didn’t help me at all (I didn’t know what exact file or directory is causing problems to SyncToy).</p>
<p align="justify">So&#8230; I make a quick look at what can I find inside System.IO, and <a href="http://msdn.microsoft.com/en-us/library/system.io.path.getinvalidpathchars.aspx">Path.GetInvalidPathChars()</a> and <a href="http://msdn.microsoft.com/en-us/library/system.io.path.getinvalidfilenamechars.aspx">Path.GetInvalidFileNameChars()</a> – it seemed that those functions will help me find those files and directories that contains illegal characters. Boy&#8230; I was wrong ;)</p>
<p align="justify">At the beginning I wrote a very simple program (C#) that recursively traversed through all <a href="http://msdn.microsoft.com/en-us/library/system.io.filesysteminfo(VS.71).aspx">FileSystemInfo</a> objects (using <a href="http://msdn.microsoft.com/en-us/library/s7xk2b58.aspx">GetDirectories</a>() and <a href="http://msdn.microsoft.com/en-us/library/ms143327.aspx">GetFiles()</a> methods) present in a given directory. The problem was, that when GetFiles() method was invoked inside a directory that contained files with illegal characters – program crashed (“Illegal Argument Exception”). I couldn’t understand it. I know what was the directory that caused problem and I easily found a file that was a cause of all this mess. The file name contained a pipe “|” character that is not allowed (at least on Microsoft’s systems). </p>
<p align="justify">I wondered how should I change my small utility to make it able to find all illegal files and generate a cute report at the end instead of crashing. I could see the file using Total Commander, Windows Explorer and even dir command executed within cmd.exe. I could – however – copy the file, rename it (tried bazylion of different approaches to achieve this task – using <a href="http://msdn.microsoft.com/en-us/library/aa365247.aspx">Universal Naming Convention</a> didn’t help a bit). I decided to rewrite main part of my utility and to use System.Diagnostics.Process and output of “DIR /A-D /B” for files and “DIR /A:D /B” for directories. My idea was to not checking the names of FileSystemInfo objects that I can get without problems using GetFiles and GetDirectories methods. I assumed (and I hope that it is assumption is correct) that if information about a file or directory can be get, than there is no problem with this object. So I decided that my code should now look more like this:</p>
<pre class="c#" name="code">try
{
    FileInfo[] files = root.GetFiles();
}
catch (System.UnauthorizedAccessException)
{
}
catch
{
    GetSystemEntries(root, EntryType.File);
}</pre>
<p align="justify">In the function that traverses through all the object there is another similar block of code that does similar task but for directories. I wasn’t sure if this approach is ok – exception catching influences performance, but it didn’t take more time than SyncToy to look through all my drive (so I assume that the performance is acceptable). GetSystemEntries is a function written by me, that invokes dir command in specified directory looking for files or directories, and analyzes output (checks if there are any invalid characters in file or directory name).</p>
<p align="justify">Yup, one problem resolved. But what about the file? As far as I remember, it was created by a browser (saving page) and it’s name comes from the title of the page, which was divided in sections using pipes. The funny thing (for me) is that I can not understand how OS may actually allow anyone to create a file with invalid characters in name (I suppose this file was created by Mozilla Firefox 3.0x). I have spent a lot more time looking for a solution how to delete the file, rename it, or do whatever to make it a file with a valid name. Back in the old dos-command-prompt days I used several times a great tool by Norton – diskedit.com – it was very powerful disk editor, that saved me a couple of times. But&#8230; although I found some similar tools, I was a bit too afraid to use them. NTFS is much more complicated than good-old FAT, and I really didn’t want to lose all my data. I rebooted to Ubuntu, and tried renaming. It worked. Then I tried to remove the file. No problems. So&#8230; thank you <a href="http://www.canonical.com/">Cannonical</a> :)</p>
<p align="justify"><a href="http://notonlyzeroesandones.site40.net/my-projects/badfilename/">App sources are available on this blog.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://notonlyzeroesandones.site40.net/2009/04/14/what-have-i-learned-thanks-to-synctoy/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>VS 2008 &amp; CUDA</title>
		<link>http://notonlyzeroesandones.site40.net/2009/02/15/vs-2008-cuda/</link>
		<comments>http://notonlyzeroesandones.site40.net/2009/02/15/vs-2008-cuda/#comments</comments>
		<pubDate>Sun, 15 Feb 2009 15:15:41 +0000</pubDate>
		<dc:creator>Maciek Talaska</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Visual Studio]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[CUDA]]></category>
		<category><![CDATA[Custom Build Rules]]></category>
		<category><![CDATA[PYTHONPATH]]></category>

		<guid isPermaLink="false">http://notonlyzeroesandones.site40.net/2009/02/15/vs-2008-cuda/</guid>
		<description><![CDATA[As a proud owner of nVidia graphic card (and being some kind of a fan of nVidia for their effort into graphics programming) I decided to go and try CUDA. At the moment the newest version is 2.1. The first thing after installing something you want to try out is to go and look at [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">As a proud owner of nVidia graphic card (and being some kind of a fan of nVidia for their effort into graphics programming) I decided to go and try CUDA. At the moment the newest version is 2.1. The first thing after installing something you want to try out is to go and look at the samples, right? The same thing I thought, but unfortunately there were some problems compiling samples from nVidia CUDA SDK. </p>
<p align="justify">I tried to compile one of the simplest samples, but I instead of success I saw error message:</p>
<blockquote><p align="left">1&gt;&#8212;&#8212; Build started: Project: cudaOpenMP, Configuration: Debug Win32 &#8212;&#8212;     <br />1&gt;Compiling with CUDA Build Rule&#8230;      <br />1&gt;&quot;C:Program FilesnVidiaCUDAbinnvcc.exe&quot;&#160;&#160; -arch sm_10 -ccbin &quot;C:Program FilesMicrosoft Visual Studio 9.0VCbin&quot;&#160;&#160;&#160; -Xcompiler &quot;/EHsc /W3 /nologo /Od /Zi&#160;&#160; /MTd&#160; &quot; -IC:Program FilesnVidiaCUDAinclude -I../../common/inc -maxrregcount=32&#160; &#8211;compile -o DebugcudaOpenMP.cu.obj cudaOpenMP.cu       <br />1&gt;nvcc fatal&#160;&#160; : A single input file is required for a non-link phase when an outputfile is specified      <br />1&gt;Linking&#8230;      <br />1&gt;LINK : fatal error LNK1181: cannot open input file &#8216;.DebugcudaOpenMP.cu.obj&#8217;      <br />1&gt;Build log was saved at &quot;file://d:MDTempProjectsCUDAprojectscudaOpenMPDebugBuildLog.htm&quot;      <br />1&gt;cudaOpenMP &#8211; 1 error(s), 0 warning(s)      <br />========== Build: 0 succeeded, 1 failed, 0 up-to-date, 0 skipped ==========</p>
</blockquote>
<p align="justify">(this is copy &amp; paste from&#160; VS Output window)</p>
<p align="justify">and the error in VS Error Window:</p>
<blockquote><p>Error&#160;&#160;&#160; 1&#160;&#160;&#160; fatal error <a href="http://support.microsoft.com/kb/815645">LNK1181</a>: cannot open input file &#8216;.DebugcudaOpenMP.cu.obj&#8217;&#160;&#160;&#160; cudaOpenMP&#160;&#160;&#160; cudaOpenMP</p>
</blockquote>
<p align="justify">The error enlisted in VS Error window is connected with linker (it is unable to find input file) so the <em>real</em> problem lies somewhere else: at the compile time. I have copied the command line that invokes nVidia’s compiler (because no other compiler is aware of all the extension nVidia created for the purpose of creating CUDA). The command line was:</p>
<blockquote><p align="justify">&quot;C:Program FilesnVidiaCUDAbinnvcc.exe&quot;&#160;&#160; -arch sm_10 -ccbin &quot;C:Program FilesMicrosoft Visual Studio 9.0VCbin&quot;&#160;&#160;&#160; -Xcompiler &quot;/EHsc /W3 /nologo /Od /Zi&#160;&#160; /MTd&#160; &quot; -IC:Program FilesnVidiaCUDAinclude -I../../common/inc -maxrregcount=32&#160; &#8211;compile -o DebugcudaOpenMP.cu.obj cudaOpenMP.cu</p>
</blockquote>
<p align="justify">Do you see the problem? Well, I didn’t see what’s wrong at the first sight too ;) Anyway, to cut it short: the problem lies in the path where nVidia CUDA SDK is installed. I have chosen to install it in “Program FilesnVidia” and not in the root directory (this is the default location – as far as I can remember). The thing is that Program Files without quotes is treated&#8230; yup, you guessed ;) everyone familiar with the way command lines arguments are being passed to programs knows that space IS a delimiter. OK. What is the solution? Very, very simple, you need to change a bit the “CUDA Build Rule”, and to change it, you need to do the following:</p>
<ol>
<li>
<div align="justify">Open your VS and open any project / solution from nVidia CUDA samples</div>
</li>
<li>
<div align="justify">Right-click on project (not on solution) and click on “Custom Build Rules”, you should see a dialog:       <br /><a href="http://notonlyzeroesandones.site40.net/wp-content/uploads/2009/02/image.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="412" alt="image" src="http://notonlyzeroesandones.site40.net/wp-content/uploads/2009/02/image-thumb.png" width="644" border="0" /></a> </div>
</li>
<li>
<div align="justify">Choose “Cuda Build Rule v2.1.0” and click on “Modify Rule File&#8230;” button, another window will pop-up:       <br /> <a href="http://notonlyzeroesandones.site40.net/wp-content/uploads/2009/02/image1.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="456" alt="image" src="http://notonlyzeroesandones.site40.net/wp-content/uploads/2009/02/image-thumb1.png" width="644" border="0" /></a> </div>
</li>
<li>
<div align="justify">Click on “Cuda Build Rule” and then on “Modify Build Rule&#8230;”       <br />&#160;<a href="http://notonlyzeroesandones.site40.net/wp-content/uploads/2009/02/image2.png"><img title="image" style="border-right: 0px; border-top: 0px; display: inline; border-left: 0px; border-bottom: 0px" height="576" alt="image" src="http://notonlyzeroesandones.site40.net/wp-content/uploads/2009/02/image-thumb2.png" width="605" border="0" /></a> </div>
</li>
<li>
<div align="justify">And finally this is the window you need to make changes in. The “Include” property (highlighted) need to be modified (simply: put [value] into quotes, so the switch for Include will look like: –I”[value]”. Now your project should compile without any errors or warnings (I assume that you’re compiling one of the nVidia CUDA samples).</div>
</li>
<li>
<div align="justify">Remember that you may have to add (register) .cu files in VS environment, but it is clearly described in readme.txt located in /doc/syntax_highlighting in your CUDA SDK directory.</div>
</li>
</ol>
<p align="justify">The same kind of problem you may have after installing Python and some python IDEs that modify environment and add PYTHONPATH. If you install Python in “Program Files” the same thing happens. The solution is to edit your PYTHONPATH variable and change it, instead of “Program Files” you may type “Progra~1” (check what is yours “Program Files” directory 8+3 name using “dir /X” command). </p>
<p align="justify">Hope it helps. Happy coding!</p>
]]></content:encoded>
			<wfw:commentRss>http://notonlyzeroesandones.site40.net/2009/02/15/vs-2008-cuda/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Windows 7 &#8211; correction</title>
		<link>http://notonlyzeroesandones.site40.net/2009/01/23/windows7-correction/</link>
		<comments>http://notonlyzeroesandones.site40.net/2009/01/23/windows7-correction/#comments</comments>
		<pubDate>Fri, 23 Jan 2009 10:36:10 +0000</pubDate>
		<dc:creator>Maciek Talaska</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows7]]></category>

		<guid isPermaLink="false">http://notonlyzeroesandones.site40.net/2009/01/23/windows7-correction/</guid>
		<description><![CDATA[In the previous post I wrote, that there are some some strange behaviours concerning Windows7 performance. Although, it seems that it wasn&#8217;t Windows7&#8217;s fault. Performance drop was caused by antivirus software (yes, the real-time protection was enabled). My desktop hardware that I use as a test machine seem to be very, very weak for nowadays [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">In the previous post I wrote, that there are some some strange behaviours concerning Windows7 performance. Although, it seems that it wasn&#8217;t Windows7&#8217;s fault. Performance drop was caused by antivirus software (yes, the real-time protection was enabled). My desktop hardware that I use as a test machine seem to be very, very weak for nowadays apps, so running antivirus caused big difference in performance. Turning it off, mad all the problems with &quot;application takes a lot of time to start&quot; to disappear. But I still have the impression that Windows7 was much faster at the very beginning (right after installation was complete) and its performance dropped after installing a few applications (and applying some Windows Updates). </p>
]]></content:encoded>
			<wfw:commentRss>http://notonlyzeroesandones.site40.net/2009/01/23/windows7-correction/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows 7 &#8211; first impressions</title>
		<link>http://notonlyzeroesandones.site40.net/2009/01/20/windows-7-first-impressions/</link>
		<comments>http://notonlyzeroesandones.site40.net/2009/01/20/windows-7-first-impressions/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 21:54:42 +0000</pubDate>
		<dc:creator>Maciek Talaska</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[Windows7]]></category>

		<guid isPermaLink="false">http://notonlyzeroesandones.site40.net/2009/01/20/windows-7-first-impressions/</guid>
		<description><![CDATA[Yesterday I made a decision to try out Windows 7. For my surprise it was way easier than I expected. Installation went without even a minor problem. After about 40 minutes (maybe a bit longer) system was set up. I have installed the system on my quite old (ok, I admit it, it almost ‘ancient’) [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">Yesterday I made a decision to try out Windows 7. For my surprise it was way easier than I expected. Installation went without even a minor problem. After about 40 minutes (maybe a bit longer) system was set up. I have installed the system on my quite old (ok, I admit it, it almost ‘ancient’) desktop PC: Athlon XP 2200+, 1.5GB of RAM, GeForce FX5900XT (GeForce 5 series), ASUS AV880 mainboard and old Seagate 40GB hard drive (quite old ATA drive) – I didn’t want to spoil my system. The only thing I was wondering about after the installation was, why Windows 7 didn’t recognize the graphics card. I know that it is old, but I was quite surprising that right after installation it was detected as ‘generic VGA adapter’. Anyway, after couple of minutes I had it working with the best drivers I found on nVidia’s site (it is great that Windows 7 is able to use Vista drivers). The other thing that didn’t work out-of-the-box was sound driver. ASUS mainboard on which the desktop PC is built has some strange AC97 compatible on-board sound, which I believe is ‘not the best one’ (I think full chip name is: ADI SOUNDMAX, or something similar). Searching for sound driver could have been much more exhausting, but&#8230; I had the driver prepared ;) I found it while installing Windows Vista. If you have problems with similar sound hardware search for “wdm_3665.zip”, unzip it, and choose the installation with ‘have disk’ method (the proper driver is in on of extracted folders – the one that contain files for Windows 2k / XP). Anyway, after about and hour, everything was configured, and I could have started using the system.</p>
<p align="justify">First impression was: wow, it really seems that this is a bit faster than Vista. But this impression didn’t last long. After installing couple of applications everything slowed down, and I started noticing some strange things: sometimes it takes a lot more time to launch some apps. Much more comparing to Vista or XP. You can even thing that app hung while loading, but it just need a bit more time to start. And it does not only affects big apps, I have this problem with Total Commander – after clicking it’s icon, it shows screen with my registration data for a couple of seconds, and then starts. It’s not a big problem, but rather something you would expect to be fixed.</p>
<p align="justify">I can’t get used to the new taskbar. There is (by default, it can be changed) no ‘quick launch’ (well, the standard one), the idea of making programs icons, that are launched a bit more ‘rounded’ is not the best – in my opinion. It is quite hard to know at the first sight which program is actually run, and which doesn’t. The cool thing is, that if you’re downloading file using Internet Explorer the icon on the taskbar shows actual downloading progress – I like it. And even IE8 beta is quite nice, the first impression is very, very positive, but it is gone, when it hangs (it seems that IE’s JavaScript engine lacks some performance) on Windows Live site. I must admit, that I had some problems with printouts – it is strange, because the same program generates proper printouts on Windows XP (I was printing to .pdf files in both cases).</p>
<p align="justify">There are dozens of small changes in Windows’ UI – but I am sure you already read about them, so I won’t repeat it. System is very stable, there is no ‘ah&#8230; this is beta&#8230;’ feeling. Taking under consideration Microsoft’s software release cycle, BETA 1 (which Windows 7 BETA build 7000 is) is never optimized for performance. It may consume less memory than Vista (although I didn’t check that, so I am not sure) but one may be disappointed if expecting huge performance boost (again: comparing to Vista). At the moment there is no point in comparing those two versions of Windows, because of immaturity of Windows 7 (everyone expect it to be Vista killer, we’ll see in next couple of months). So what’s the point in installing Windows 7? There are some new features you may be interested in (shortcuts, famous ‘make window half screen wide’ feature and alike). Concepts of home network and document libraries (did they take the WinFS back from grave?) are very interesting. If you have some free GB’s on your hard drive – I think Windows 7 is definitely worth installing.</p>
]]></content:encoded>
			<wfw:commentRss>http://notonlyzeroesandones.site40.net/2009/01/20/windows-7-first-impressions/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatic system backups</title>
		<link>http://notonlyzeroesandones.site40.net/2008/09/05/automatic-system-backups/</link>
		<comments>http://notonlyzeroesandones.site40.net/2008/09/05/automatic-system-backups/#comments</comments>
		<pubDate>Thu, 04 Sep 2008 23:40:00 +0000</pubDate>
		<dc:creator>Maciek Talaska</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[backup]]></category>
		<category><![CDATA[c#]]></category>
		<category><![CDATA[system maintenance]]></category>

		<guid isPermaLink="false">http://notonlyzeroesandones.wordpress.com/2008/09/05/automatic-system-backups/</guid>
		<description><![CDATA[The need of creating backups is obvious. Data is the most important thing on everyone&#8217;s PC. But how about all the environment? What about system, it&#8217;s configuration, configuration of all installed applications? A while ago a new idea was presented &#8211; image creating software. The first was (I think) Norton Ghost. At the very begging [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">The need of creating backups is obvious. Data is the most important thing on everyone&#8217;s PC. But how about all the environment? What about system, it&#8217;s configuration, configuration of all installed applications? A while ago a new idea was presented &#8211; image creating software. The first was (I think) Norton Ghost. At the very begging the app was very, very small (just a little bit bigger than 100 kilobytes) and run under DOS (so yes, you did have to have a DOS bootable diskette, or ability to boot into plain old DOS environment). This kind of software became more and more popular, and nowadays there are dozens of applications you may choose from. There is, however, one I would like to present &#8211; special version of <a href="http://www.seagate.com/ww/v/index.jsp?locale=en-US&amp;name=MaxBlast_5&amp;vgnextoid=7add8b9c4a8ff010VgnVCM100000dd04090aRCRD"><em>Acronis True Image</em></a> available under the name of <span class="Apple-style-span" style="font-style:italic;"><a href="http://www.seagate.com/ww/v/index.jsp?locale=en-US&amp;name=MaxBlast_5&amp;vgnextoid=7add8b9c4a8ff010VgnVCM100000dd04090aRCRD">&#8220;MaxBlast&#8221;</a></span> at Seagate&#8217;s site. This software is free for everyone who has Maxtor or Seagate hard drive installed in their PC. I am not sure which version of Acronis True Image is being available under the label of MaxBlast, but as far as I remember it is version 10.0 (there is version 11.0 of Acronis True Image available). So what is so great about this software except it&#8217;s price? Well, it suits my needs very good: it creates really small images (although it takes a lot of time, if you choose the maximum compression level), and allows to restore images in a very convenient way &#8211; you just decide what you want to do, and if you choose to restore whole system partition (the one you actually work on) the software boots before windows, and makes all operations necessary to restore your previous environment.</p>
<p align="justify">There is one thing, I think would be very handful for a lot of people. Possibility of storing configuration on-line. I imagine it should work like this: all applications will use the same way of storing all its settings (for example somewhere in Applications Data). Zipping those files should not be a problem. And of course it should be possibile to restore the configuration in only few clicks. I would like it to be connected with one of the free file storing services (Dropbox, Microsoft&#8217;s SkyDrive or any other). Advantage of such a behavior is obvious &#8211; one could save a lot of time in case of reinstalling system and all applications (and it is not always possible to restore previously created system image &#8211; sometimes you just install your system from scratch, for example after acquiring new machine&#8230;).</p>
<p align="justify">Anyway&#8230; going back to system backups. They are really important, but what I have learned while working with Windows is that registry files are crucial. Sometimes you may wonder what happened, and after deep investigation you realize that one (or more) of registry files is broken. So&#8230; what to do? Creating system backup everyday is not convenient (and as I said before &#8211; it takes a lot of time. Personally I create full system backup once a week only). But there is a way to keep those vulnerable files in safe place in case something happens. There is even a small and handy application written that does this task for you &#8211; <a href="http://www.larshederer.homepage.t-online.de/erunt/"><em>Erunt</em></a>. I started using this small tool a while ago, and after a couple of weeks I have spotted an <em><a href="http://www.winhelponline.com/blog/backup-windows-vista-registry-daily-using-erunt/">interesting article</a></em> that shows how to configure Erunt using task scheduler, so it is being run every time your Windows starts. It is great, but&#8230; those backup files are a bit too big (registry backup on my Vista based laptop takes about 80MB for each day &#8211; for me it is definitely too big). I started to create a small batch, that you may find useful. So, here it is:</p>
<pre class="vb" name="code">@echo off
set root=AutoBackup
set maxfiles=5
&quot;eruntAUTOBACK.EXE&quot; %root%#Date# sysreg otherusers /noconfirmdelete /noprogresswindow

rem setting date variables
set day=%DATE:~7,2%
if %day:~0,1% == 0 (set shortday=%DATE:~8,1%) else (set shortday=%DATE:~7,2%)
set month=%DATE:~4,2%
if %month:~0,1% == 0 (set shortmonth=%DATE:~5,1%) else (set shortmonth=%month%)
set year=%DATE:~-4%

rem setting archive and folder names...
set archive_name=%year%-%month%-%day%
set folder_name=%shortmonth%-%shortday%-%year%

rem compress the registry backup files...
cd %root%

rem backup command: &quot;c:program files7-Zip7z.exe&quot; a -r -t7z -mx9 &lt;archive name&gt; &lt;directory&gt;
&quot;c:program files7-Zip7z.exe&quot; a -r -t7z -mx9 %archive_name%.7z %folder_name%
cd ..

rem ...removing folder...
rd /S /Q %root%%folder_name%

rem ...checking if there are some old-registry backup files that should be deleted

@if exist files.txt ( del files.txt )
cd %root%
@set filenum=0
@dir *.7z /b /o:-n &gt; ..files.txt

for /f %%f in (..files.txt) do (
call ..autorun-del.cmd %%f )
cd..
if exist files.txt ( del files.txt )</pre>
<p>and (thanks to the limitations of batch files) the second, very small batch:</p>
<pre class="vb" name="code">set /a filenum=filenum+1
if %filenum% GTR %maxfiles% ( del /F /Q %1 )</pre>
<div style="text-align:justify;">How does it work? The idea is simple. After creating folder that contains backup of all registry files &#8211; the folder and its&#8217; content is being compressed. Then, the folder is being deleted. At the end the script checks if there are too many backup files (i.e. if amount of backup files is greater than the one you set in <em>&#8216;autorun.cmd&#8217;</em>) &#8211; if so, the oldest file(s) are deleted. I have set the script to run before logging into Windows, but you can of course run the script manually (if using Vista with UAC remember to give it proper privileges). Archives containing backups of registry files are created per-day &#8211; if the script is being run more then once &#8211; it updates the content of the archive. I assumed that:</div>
<ul>
<li>the folder where <em><a href="http://www.larshederer.homepage.t-online.de/erunt/">Erunt</a></em> is stored is named &#8216;Erunt&#8217;; both batch files should be located in the Erunt&#8217;s parent folder</li>
<li>archives with registry backup files are stored in Erunt&#8217;s sibling-folder. The folder&#8217;s name is &#8216;AutoBackup&#8217; (you may change it &#8211; folder name is stored in <strong><span style="color:#000080;">%root%</span></strong> variable)</li>
<li>
<div>default amount of backup archives is 5 &#8211; it may be changed by editing <span style="color:#000080;"><strong>%maxfiles%</strong></span><span style="color:#000000;"> &#8211; thanks to compression one archive is only about 11MB, so even storing backups of last two weeks is not a big-deal.</span></div>
</li>
</ul>
<div style="text-align:justify;">After struggling with windows batch files, I solemnly promised myself not to use it any more. Next time I will have to create anything like this, I will use PowerShell or Python ;) Batch files are a real pain. Hope someone finds it a bit helpful. For me it is a way to be more confident that in case of system damage I will be able to recover my environment very fast.</div>
]]></content:encoded>
			<wfw:commentRss>http://notonlyzeroesandones.site40.net/2008/09/05/automatic-system-backups/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Universal(?) Disk Format&#8230;</title>
		<link>http://notonlyzeroesandones.site40.net/2008/08/31/universal-disk-format/</link>
		<comments>http://notonlyzeroesandones.site40.net/2008/08/31/universal-disk-format/#comments</comments>
		<pubDate>Sun, 31 Aug 2008 21:23:00 +0000</pubDate>
		<dc:creator>Maciek Talaska</dc:creator>
				<category><![CDATA[Windows]]></category>
		<category><![CDATA[UDF]]></category>
		<category><![CDATA[UDF virtual drive]]></category>
		<category><![CDATA[virtual drive]]></category>

		<guid isPermaLink="false">http://notonlyzeroesandones.wordpress.com/2008/08/31/universal-disk-format/</guid>
		<description><![CDATA[Funny thing, but when I hear that something is &#8216;universal&#8217; I am starting having doubts. Not about universality. No. About usefulness. I wonder if something that is &#8216;universal&#8217; is capable of doing one thing the proper way. In Poland we have a saying: &#8216;If something is quite-good in many areas, it is not good enough [...]]]></description>
			<content:encoded><![CDATA[<p align="justify">Funny thing, but when I hear that something is <em>&#8216;universal&#8217;</em> I am starting having doubts. Not about universality. No. About usefulness. I wonder if something that is <em>&#8216;universal&#8217;</em> is capable of doing one thing the proper way. In Poland we have a saying: &#8216;If something is quite-good in many areas, it is not good enough in any of them&#8217;. </p>
<p align="justify">Few days ago, I received an .iso image that was created as an <a href="http://en.wikipedia.org/wiki/Universal_Disk_Format"><em>udf</em></a> image. I am using the free version of <a href="http://trial.alcohol-soft.com/"><em>Alcohol 52%</em></a>, so I mounted it immediately&#8230; and saw only information, that &#8216;this disk was created as an udf image, and your system does not support this format&#8217; (or something like this). I tried to mount it on my alternative os &#8211; Ubuntu 8.04 (also using <em>udftools</em>) &#8211; but it didn&#8217;t work too. I Googled for a while, and found a solution &#8211; the free version of Elby&#8217;s <a href="http://www.elby.ch/fun/software/index.html"><em>Virtual Clone Drive</em></a>. I mounted the image to a new virtual drive&#8230; and it worked! It seems that Elby&#8217;s virtual drive is the only free software that is capable of mounting disks in udf format (or udf 2.x &#8211; I didn&#8217;t checked the version). I didn&#8217;t get rid of Alcohol 52% (mainly because of it shell integration) but Vritual Clone Drive is just a good addition when needed.</p>
]]></content:encoded>
			<wfw:commentRss>http://notonlyzeroesandones.site40.net/2008/08/31/universal-disk-format/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Problems uninstalling VS 2003?</title>
		<link>http://notonlyzeroesandones.site40.net/2008/02/24/problems-uninstalling-vs-2003/</link>
		<comments>http://notonlyzeroesandones.site40.net/2008/02/24/problems-uninstalling-vs-2003/#comments</comments>
		<pubDate>Sun, 24 Feb 2008 17:27:00 +0000</pubDate>
		<dc:creator>Maciek Talaska</dc:creator>
				<category><![CDATA[Programming]]></category>
		<category><![CDATA[Windows]]></category>
		<category><![CDATA[Visual Studio]]></category>

		<guid isPermaLink="false">http://notonlyzeroesandones.wordpress.com/2008/02/24/problems-uninstalling-vs-2003/</guid>
		<description><![CDATA[Recently I was just trying to get rid of some apps I would not use any more. I found out that I still have VS 2003 installed. VS and MSDN takes about 3GB of space so I almost immediately launech &#8220;Add Remove Programs&#8221; and clicked &#8220;Remove&#8221;. As for my surprise VS did not want to [...]]]></description>
			<content:encoded><![CDATA[<div style="text-align:justify;">Recently I was just trying to get rid of some apps I would not use any more. I found out that I still have VS 2003 installed. VS and MSDN takes about 3GB of space so I almost immediately launech &#8220;Add Remove Programs&#8221; and clicked &#8220;Remove&#8221;. As for my surprise VS did not want to unistall. It just showed me again the dialog box where I could choose which features I would like to <span style="font-weight:bold;">install<span style="font-style:italic;">.</span></span> I repeated procedure several times, but nothing changed. In the act of desperation, I just deselected everything and clicked &#8220;install&#8221;. Then (just at the very begging of installation) clicked &#8220;cancel&#8221;, and started the procedure again from clicking &#8220;remove&#8221; in &#8220;Add Remove Programs&#8221;. And&#8230; it worked.</p>
<p>One thing that struck my mind is that installing / uninstalling applications is still a pain. If you are to install / uninstall several applications&#8230; you are to waste some time sitting in front of your PC and waiting for any actions you should take. Why there is no possibility to choose many apps to deinstall? Why is it still so hard to install several apps one after another? Why can&#8217;t you just have the possibility to &#8220;batch&#8221; installation processes? Why nobody though of making installers able to read some &#8220;setup configuration&#8221; (so that you could specify some basic options for installation like: destination folder, type of installation: full / minimal &#8211; custom will need of course your assistance&#8230;). PC hardware and OS&#8217;es changed a lot in recent years, but maintaining your software is still not as painful as it should be. When will we see new better setup technology? Will we see it at all?</div>
]]></content:encoded>
			<wfw:commentRss>http://notonlyzeroesandones.site40.net/2008/02/24/problems-uninstalling-vs-2003/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

<!-- www.000webhost.com Analytics Code -->
<script type="text/javascript" src="http://analytics.hosting24.com/count.php"></script>
<noscript><a href="http://www.hosting24.com/"><img src="http://analytics.hosting24.com/count.php" alt="web hosting" /></a></noscript>
<!-- End Of Code -->
