














1 private int CompareTokens(CommandLineParser commandLineParser)
2 {3 var n = System.Math.Min(this.tokens.Length, commandLineParser.tokens.Length);
4 5 for (var i = 0; i < n; i++)
6 {7 var result = this.tokens[i].CompareTo(commandLineParser.tokens[i]);
8 if (result != 0)
9 {10 return result;
11 } 12 } 13 14 if (this.tokens.Length < commandLineParser.tokens.Length)
15 {16 return -1;
17 } 18 19 if (this.tokens.Length > commandLineParser.tokens.Length)
20 {21 return +1;
22 } 23 24 return 0;
25 }1 private int CompareTokens(CommandLineParser commandLineParser)
2 {3 var result = 0;
4 5 var n = System.Math.Min(this.tokens.Length, commandLineParser.tokens.Length);
6 7 for (var i = 0; i < n; i++)
8 {9 result = this.tokens[i].CompareTo(commandLineParser.tokens[i]);
10 if (result != 0)
11 {12 break;
13 } 14 } 15 16 if (result == 0)
17 {18 if (this.tokens.Length < commandLineParser.tokens.Length)
19 {20 result = -1;
21 }22 else if (this.tokens.Length > commandLineParser.tokens.Length)
23 {24 result = +1;
25 } 26 } 27 28 return result;
29 }1 using System;
2 using System.Collections.Generic;
3 using System.Linq;
4 using System.Windows.Forms;
5 6 namespace Test1
7 {8 static class Program
9 { 10 /// <summary> 11 /// The main entry point for the application. 12 /// </summary>13 [STAThread]
14 static void Main()
15 {16 Application.EnableVisualStyles();
17 Application.SetCompatibleTextRenderingDefault(false);
18 Application.Run(new Form1());
19 } 20 } 21 }296 else if (path.EndsWith(":"))
297 {298 path += @".\";
299 }300 else if (!path.EndsWith(@"\"))
301 {302 path += @"\";
303 } 304 305 path = System.IO.Path.GetFullPath(path);
306 if (path == null)
307 {308 throw new System.ApplicationException("GetFullPath() returned NULL unexpectedly.");
309 } 310 311 if (fileType == FileTypes.File)
312 { 313 // Special cases for when x.txt is truly a FileInfo, this code 314 // must come after the GetFullPath() call above: 315 // c:\x.txt\ 316 // Path: c:\x.txt\ 317 // File: 318 // c:\x.txt\. 319 // Path: c:\x.txt\ 320 // File: . 321 // c:\x.txt\.\.\.\\\.\.\..\x.txt\\\\\.\.\.\..\x.txt\.\ 322 // Path: c:\x.txt\ 323 // File: 324 // c:\x.txt\.\.\.\\\.\.\..\x.txt\\\\\.\.\.\..\x.txt\.\. 325 // Path: c:\x.txt\ 326 // File: . 327 // c:\x.txt\.\.\.\\\.\.\..\x.txt\\\\\.\.\.\..\x.txt\.\.\\\ 328 // Path: c:\x.txt\ 329 // File: .330 if (((fileName == string.Empty) || (fileName == ".")) &&
331 path.EndsWith(@"\"))
332 {333 fileSpec = path.Substring(0, path.Length - 1); // Make the new filespec be the earlier resolved Path minus the trailing \
334 path = System.IO.Path.GetDirectoryName(fileSpec);
335 336 if (path == null)
337 {






A couple of weeks ago, I got a new cable modem. I mentioned how the old one, a Linksys BEFCMU10, had been somewhat flakey, needing to be unplugged every once in a while because it would lock up. The other problem it had was that it was only DOCSIS 1.0, which is not supported by my cable company. I had been hitting eBay and CNET to try to figure out what new cable modem to get, but my cable company had a $35 special on new Ambit U10C018.80 (also known as Ubee) DOCSIS 2.0 cable modems, so I just did that. This new modem is 1/3 the size, 1/2 the cost, and 6x faster than my older one. I'm very happy with it. Haven't had one problem since installing it. Right now with our basic internet package, my download speed is 14 Mb/s and upload is 1.0. My numbers used to be 2.2 and 1.0. (Test yours)

powercfg -h offYou can get rid of all of the Restore Points by turning off System Restore, and you can get rid of the swap file by disabling virtual memory from the Control Panel. I did all of this, then Windows wants to reboot. Guess what? After rebooting, the system is screwed up. Why? Oh I have a Ghost image I can restore, but only from a week ago. Didn't think to back up before moving all of the personal files and disabling those features. Didn't think I would need to. So I got to start all over. In fact, I got to start over several times. I finally realized that any time I remove the swap file, the system gets screwed up. It is probably something to do with a low-memory condition. But as I say, that is not the only thing that will screw it up. I finally got a stable configuration for the C: drive, including good Ghost backups of the drive on my TeraStation network storage. So, the next thing I wanted to do was to install a new 1 GBit network card to speed up backups even further. I looked at a bunch of vendors and decided on the D-Link DGE-530T because I just love my new D-Link DIR-855 router. This was a huge mistake. I think. After several attempts, I have not been able to get Vista to even SEE that it is installed in the computer. My motherboard does have an onboard LAN connection, so I was sure to disable this in the BIOS before installing the new NIC. The directions say that Vista should see it and then offer to install a driver for it. But nothing I have tried will cause this NIC to be seen, and worse, it screws up my Vista, like all the other changes I make, and I have to restore from a backup... which is on the network... which requires a working network card... which requires the new NIC to be removed... which requires the PC to be powered down... then requires the BIOS to be adjusted again... and the network cable to be reinserted into the original jack... and then rebooting from the Ghost CD... then restoring the backup which takes 1.5 hrs... etc. It is very taxing. When Vista is working, it runs great. But I hate how it can get screwed up. This has been a very long two weeks. Oh, and the D: drive... I am not using Ghost to back up our personal files. I am using XXCopy to make a duplicate image of the file structure on my 1 TB TeraStation, using the command
xxcopy d:\*.* \\ts1\data\Backups\ComputerName /D /M /E /C /F /H /I
/R /K /Y /ZY /YY /EX:c:\Misc\D_Excludes.txt
Error 4201: The instance name passed was not recognized as valid by a WMI data providerForum threads such as this Microsoft Technet one indicated that it was a permissions problem on certain folders or files, or else it was an ACL problem. I tried a few things with permissions, but nothing was helping. The suggested ACL fixes are complicated and may not have worked anyway. So, I decided to just restore that whole computer from a backup. I just happened to have a 2-day old Ghost backup image of the drive, so that was good to restore from. Trouble is, it is on my Buffalo Terastation NAS drive, and I only have a 100 mbit NIC in this computer. When I booted up from the Ghost CD, it started to do a verify of the image before the restore. It estimated 15 hours... yowzer. Well, we were leaving for the 4th of July weekend anyway, so I just turned off the monitor and left for vacation. There is a checkbox in Ghost to tell it to reboot when it is done restoring, and I told it to go ahead, expecting that when I returned, I would see the usual login screen and everything would be fixed. But guess what? When I got back late last not, the problem was STILL THERE. WHAT?!!! This problem was NOT there when I made the backup on Wednesday. What's going on? Oh... did I mention that I also have a RAMDisk, and I have all of our temp directories pointed there, along with all of the browser cache files going there? When I upgraded to Vista 64, Superspeed required that I get a new license for Vista. It is not a license that you can get immediately. You have to send them an email, then they respond back with the key. In the meantime, you can run the software in trial mode for 30 days, at which time it expires and quits working. Here is the genesis of my trouble: I neglected to update the license key for the RAMDisk and it quit working right at the end of June. Therefore, the temp file locations were no longer valid because the drive was no longer there. Now here is the 1st lesson that I learned about Vista: If you boot up your computer with the temp file location unavailable, the Event Log service will not start up, and all sorts of other nasty inexplicable problems crop up. I noticed that this was a problem, but unfortunately, the Ghost image was not created with the RAMDisk license info installed. What I decided to try, and really hoped would work, was to predate the computer to mid-June, before restoring the backup. That way, when the computer booted up, it will think it was June and the RAMDisk would be active, thus having a valid temp file location. I also disconnected the computer from the internet, in case Vista would try to fix the time using a time server. To speed things up, I copied the network Ghost image to the D: drive on the computer, and restored from there. Then crossed my fingers. I was happy to find that this worked perfectly, and I now have a fully functioning Vista again. Oh... and the original internet problem... It was not WU at all, it was the stupid cable modem, and only needed to reset it to make it work again. The 2nd thing I learned was: Don't procrastinate on entering license keys. The 3rd thing: Norton Ghost is worth its price in times like this.
