Friday, November 30, 2007
Why the start of Heroes season 2 sucked (and related info)
Thursday, October 25, 2007
Of MainMenus, MenuStrips, and Visual Basic 2005
Augh!
So stupid...so I just had to go through the event procedures I had written and re-add the "Handles mnuFileExit.Click" type thing to each procedure, and it worked like a charm.
So in summary, if you're ever using the MainMenu control in Visual Studio 2005, and it won't attach to the form, or disappears when you click elsewhere, just cut, paste, and re-add your Handles clauses to your event handlers.
I will be glad when I can get out of this insanity and go back to my nice, warm, comfortable Linux. How did I survive in this cold, hard, angry world of Windows for so long is beyond me.
Thursday, August 9, 2007
An Animated Gif for the Tango Throbber
So, I whipped out my trusty GIMP and went to work. The result? A animated gif of Tango's throbber (they call it process-working). I made a slow version, a medium version and a fast version, for your pleasure. You can also download the GIMP XCF so that you can make it whatever speed you want - just make sure to get rid of the blank frame at the beginning if you want it to loop.
Enjoy!
Oh, and Tango Icons are Creative Commons Attribution-ShareAlike. I've taken care of the attribution, hopefully this counts as sharealike...if not, someone let me know and I'll be happy to fix it.
Monday, July 9, 2007
Moving or Changing your Documents and Settings and Program Files directories to a different partition on Windows XP
Well, I had this big fancy walkthrough on how to do this during the Windows install so it would be nice and clean and easy. And it would have been - but I couldn't get it to work. I may have been more successful if I had a floppy drive, but I don't. So I had to do it the messy way - which actually ended up pretty clean in the long run. Here's about how it went down.
First, I installed Windows XP normally - plain vanilla, standard install. The key to doing things the 'messy' way is to install as little as possible before you go around messing with things. I would highly reccommend grabbing John Haller's portable apps suite, putting it on your flash drive, and running what you need off of that (for example, Portable Firefox to bring up this blog, or any how-to pages or downloads). I made the mistake of installing Firefox and my wireless driver first - which caused some annoying problems, especially the Intel wireless, which I'll go into down below.
Firstly, if your wireless doesn't work becuase of a driver, I would reccommend plugging into ethernet somewhere for now. If your LAN port doesn't work (unlikely), use another computer to pull up the how-to pages. Copy any needed files over on a flash drive. Once again, the key here is to avoid adding ANYTHING to your computer until after you get this taken care of. A squeaky-clean windows install is what you want.
I started with a nice post over at WinForums that, while I'll be doing most of the replacing myself, gives a nice procedure on when to do it. Oh, and to do the replacing, you'll need either a lot of free time and a good measure of masochist tendencies, or a registry-replace program. I'd reccomend going with the second option. I used RegReplace, a C++ freeware program. I don't know of its merits versus other programs available, but it worked fine for my purposes. Don't let its command line interface scare you away, it's very simple.
So, to get this thing started, follow the first few steps on the WinForums post:
- Login as administrator
- Create a backup copy of your registry - this is very important, you can screw up all kinds of stuff messing with your registry, and you'll need a backup in case you do. To do so, go Start->Run (Windows Key+R) and type 'regedit'. Click on "My Computer" and select File->Export. Save it somewhere safe, preferably off-disk, such as a flash drive. it will be somewhat large, my fresh Windows install was about 25MB, yours will probably be similar. Just make sure it's somewhere around there.
- Create a new user (Start->Control Panel->User Accounts) as an administrator, call him (or her) "temp" - you won't need the account for long.
- Log out of Administrator
- Log in as temp
- Create your target folders - I did it the hard way and renamed my folders as well, so I'll be using D:\ProgDir for Program Files and D:\Profiles for Documents and Settings. You can use whatever you like. Just replace any mention of D:\ProgDir and D:\Profiles with whatever you chose. In any event, you'll need to create them wherever they belong - I went to D:\ and just created a couple folders and named them ProgDir and Profiles.
- Now it's time to get our hands dirty. Bring up a command prompt and cd to the location that you downloaded regreplace.exe. For example, if it's on your flash drive at E:\Downloads, you would do something like the following:
C:\Documents and Settings\temp\>E:
E:\>cd Downloads
E:\Downloads>
Now, time to run the regreplace. You specify what to search for by adding /S "String to find" after the exe, and /R "String to replace with" after that. For example:E:\Downloads>regreplace.exe /S "C:\Documents and Settings" /R "D:\Profiles"
E:\Downloads>regreplace.exe /S "%systemdrive%\Documents and Settings" /R "D:\Profiles"
E:\Downloads>regreplace.exe /S "C:\Program Files" /R "D:\ProgDir"
Now, there will be a bunch of status messages between those letting you know that it's replacing stuff. That's just fine - let it do its thing. There are a few things we did here:- Replaced references to C:\Documents and Settings with our new path (D:\Profiles in my case)
- Replaced references to C:\Program Files with our new path (D:\ProgDir in my case)
- Most strangely, replaced references to %systemdrive\Documents and Settings with our new path (D:\Profiles in my case). %systemdrive% is an environment variable that contains the drive that the Windows dir is on. Environment variables are basically placeholders that can be used all over the system for various often-used paths, like the system drive.
- Now that we've done most of the dirty work (that wasn't so hard, was it?), we need to go smooth out some rough edges. For instance, regreplace only replaces string values - not keys or other random things. So you'll have to do a little manual search-and-replace, but not too much. Also it's good to make sure that we got everything. But first, the next couple steps on WinForums.
- Go to HKLM\SYSTEM\CONTROLSET001\CONTROL\HIVELIST\
you will see 2 SIDs at the bottom of that key similar to the following...
\\REGISTRY\\USER\\S-1-5-21-602162358-616249376-839522115-1001"="\\Device\\HarddiskVolume2\\Documents and Settings\\temp\\NTUSER.DAT"
"\\REGISTRY\\USER\\S-1-5-21-602162358-616249376-839522115-1001_Classes"="\\Device\\HarddiskVolume2\\Document s and Settings\\temp\\Local Settings\\Application Data\\Microsoft\\Windows\\UsrClass.dat"
See that number after "HarddiskVolume"? It may not be 2, it might be 1 or 3 or 17 (unlikely). Whatever it is, take whatever drive letter you want your directories to be on (D), count how many letters away from the drive it's on now (C), and add it. So if it's 2 right now, and you're moving from C to D, that's 1 away - meaning HarddiskVolume3 would be your new label. - Now copy the folders (except the temp user folder and all users folder) from C:\documents and settings\ to where you want it (D:\Profiles here).
- Go ahead and search for "Documents and Settings" and "Program Files", replacing any wrongly-pointing entries to your new location (D:\Profiles, D:\ProgDir) by hand. In a fresh install, there shouldn't be many left.
- Do a reboot - a complete reboot is always best when you're working with the registry, I've found. When it comes back up, log in as Adminsitrator.
- Try to copy the All Users folder (inside Documents and Settings) over to the D: drive and rename (or delete) the C:\Documents and Settings. If succesful, You're done, otherwise, you may have to wrestle a bit.
- If you have problems, you can just try finding and replacing any wrongly pointing entries manually again and rebooting, or try booting into safe mode - whatever you can do to get the settings to stick. In my case, I had my wifi driver running, and I had to go uninstall it (which was a pain), make sure it wasn't trying to boot up with Windows, and finally get rid of the folders on the C:\ drive.
If things went (somewhat) well, you should in the end only have a WINDOWS folder in your C:\ drive, and all your programs and data should be on the D:\ drive (or wherever you chose). New programs should install there by default, and it will be quite better for backup purposes and just a lot cleaner. You may still have some shortcuts and such on your hard drive pointing to your folders that were in the C:\ drive - I used the free ReplaceEm to root out and fix these various pointers.
So, thanks to the helpful folks over at WinForums, I've compiled a step-by-step guide to moving your docs and settings and program files folders to a separate partition. Here goes.
Stage 1: Preparation of Boot Media
Not as scary as it sounds, just getting a boot USB stick (easy) or floppy (dead easy) ready.
- First of all, if your computer has a floppy drive, then download and run the DOS 6.22 boot disk installer, and skip to stage 2. Since most computers nowadays don't have one (thanks, Dell), you'll probably have to find a flash drive that you're willing to part with the contents of, at least temporarily. Smaller ones are better, since they'll have less data to backup, but anything will do. If you don't have one, go pick one of those 32MB sticks out of the candy jar at staples for $5. If they don't have them, you can get a 512MB stick for $10, in cute pink or slightly less effeminate blue, or a more functional 256MB stick. Whatever you choose, be ready to part with and/or back up the data that's on it.
- Hop on over to National Instruments where they have a nice tutorial on how to
- Hop over to HP's website (thanks to Damien Stolarz over at O'Reilly for the tip) and download their Bootable UFD utility. While you're at it, stroll on over to BootDisk.com (a very helpful site) and grab the zipped DOS 6.22 floppy image - you'll need it for HP's wizard to work.
- Unzip the image you downloaded to a place of your choosing, and run the installer for the HP utility. You'll then have an "HP System Tools" folder in your start menu - find it and run the DriveKey Boot Utility.
- Pick your drive letter, choose "Create New or Replace Existing Configuration" (check the Backup box if you need to - but a warning, it didn't seem to work for me and I'd already backed up my flash drive with John Haller's excellent backup utility, so I didn't worry about it.)
- Choose the "Floppy Disk" option, and then select "Image from File". Browse to where you unzipped your DOS 6.22 zip that you downloaded earlier, and select the "622c.img" file.
- Click "Finish", and then unplug the flash drive.
Stage 2 - Installing Windows
- First, a little prep - plug the flash drive back in or put your floppy in, and paste the following into Notepad. Both sections are optional, and you need to replace "E:\Program Files" and "E:\Documents and Settings" with wherever you want your directories, of course.
- Now save that as UNATTEND.TXT to your boot disk (USB or floppy)
- Put your boot disk into the target computer and turn it on. You may have to press F2 or Delete or F8 or the Anykey or something to get it to boot from your boot disk.
- If all goes well, you should boot into a DOS prompt. Make sure your Windows CD is in the drive, and type the following, where D is your CD drive lettter:
- Continue installing Windows as normal. It'll be slower, but in the end it'll be just how you want it.
[Unattended]
ProgramFilesDir="E:\Program Files\" ;Program Files
CommonProgramFilesDir="E:\Program Files\Common\"
[GuiUnattended]
ProfilesDir="E:\Documents and Settings\";Documents and Settings
D:\i386\winnt /u:[UNATTEND.TXT path] /s:D:\i386
Well, that's about it. Let me know if you have any questions or problems, and I'll do my best to dig up some solutions and answers (respectively).
Sunday, July 8, 2007
I'm tired, I think I'm going to go program now.
Installing Windows (definitely not the energy-efficient kind)
Oh, maybe you want to know what my plan is. I've got an Acer Aspire 1640 with a 120 GB hard drive. Intel integrated video and wireless, anyway, I plan to do an 8GB partition for Windows XP, with the Documents and Settings dir and Program Files on my data partition, which will be 60GB. Both of those will be FAT32/vfat for easy access from Linux. My Linux will be on about an 8GB partition, with whatever's left over being allocated for Linux data. Hopefully I'll have an external hard drive soon for music and pictures and the like, but that's getting ahead of things. Okay, back to your regularly scheduled programming.
So, I boot up, and am presented with...an ugly text-based horror? Eew, what is this, Debian? Hmm, figured that Windows being so user-friendly, it'd have a decent installer like, say, Ubuntu. Oh well, I manage to find the right keys to get a 8GB system partition for my Windows XP, after a few tries to get it FAT (so I can access it nicely from Linux), I hit the "Create Partiton" key and go occupy myself while it does its thing. I come back several minutes later to find my computer rebooting - what? I just created a partition...yargh. Oh well, the graphical installer came up, I suppose I'll create my 60GB data partition when I do my Ubuntu install. So I click through the installer (which annoyingly is stretched on my widescreen), which goes pretty smoothly.
After Windows starts up, I find out that my video card, wireless, and who-knows-what-else don't work right. So this is what it feels like to not have Windows preconfigured for you. Since I didn't want to bother hooking it up to Ethernet, I download it to the desktop and scoot it across with my flash drive. After choking through the 43MB (?!?!?) download, I install my wireless and get down to business.
I go to access my shared folders to burn my backups. First thing, I have to run the glorious Network Setup Wizard if I want to change ANYTHING, and I click through, and realize how much I hate some things. Like the "Disconnected Hardware" box. The second step of the Network Setup Wizard informs you that your network cable is unplugged (well, DUH, I'm using wireless), and INSISTS that I not only look at the list of disconnected harware, but check the box that ensures them that I'm okay with ignoring it. Now the vast majority of laptop users are going to have disconnected hardware, since you generally only use one interface at a time. So what's the point of informing them that their hardware is disconnected - argh, I give up. It just rubbed me way the wrong way. So I set it up right, and found out my files didn't want to copy over correctly. Fine, I'll share my CD drive, I thought. After realizing that I had to have it empty to do so, I went to my desktop to access it, and couldn't. Ugh. Fine, I'll leave this for later. Let's get on with installing Windows.
First thing, I went to getfirefox.com to download Firefox, the first and only time I'll use Internet Explorer. After getting Firefox installed, I navigate to the Acer driver downloads site to get my video drivers. And I find out that they recently made it all-flash. Dang, I hate all-flash sites. After watiting for three years for it to load, I'm mildly pleased by the interface, until I realize that it's not working. I click "Notebooks" in the first box, "Aspire 1640" in the second, all the while muttering about how this could be done with a bit of javascript, and then wait for the list of drivers in the third box to come up. And it does, but...it lists the drivers for EVERYTHING. I have six kajillion video drivers to choose from, none of which are for my laptop. "I HATE YOU!!!" I scream, and my father gives me a strange look. After assuring him that I'm talking to Acer's website, I decided to deal with it later. I just want to get this thing going.
Down the Rabbit Hole: My adventures installing my computer from scratch
First, I picked up a 2.5" enclosure, which I highly recommend - it makes the process way easier. I had a desktop available with about 20 gigs of free space to play with, so I could just copy my files to that, 7-zip them up, and worry about burning them to DVDs and such later. The enclosure I got was pretty straightforward, I got it for free after rebate from Buy.com, rebates are a hassle, but they're worth it if you're a poor college student like me.
Copying my files was a pretty painless process, but to get at my Linux partitions from Windows, I first tried what I've previously used, ext2 ifs, but it didn't seem to like copying files over. So instead I found Explore2fs, which was very easy to use, worked like a charm, and eventually copied my Linux data to my desktop. I zipped up the home dir (since that's all I wanted) in a few chunks, and deleted the originals. Then I copied my Windows files over (which, annoyingly, didn't have a home dir to work with), and zipped them up in a few DVD-size chunks. After deleting the originals again, I moved all the zips over to my shared directory so that I could burn them (since my desktop didn't have a DVD burner).
Since my files were safe on my desktop, and I didn't want to mess with burning them on my old system, I took my hard drive out of my enclosure and put it back in my laptop. Next up was installing Windows XP.
Friday, April 6, 2007
Why I hate U3
I hate U3 because it pops up whether I want it to or not, did not have my permission to be there, and takes the messy and unfriendly step of adding another CD drive to my computer. I don't need a proprietary platform to run my portable apps on, a guy named John Haller has already provided me with a quality, universal, and free solution, with a launcher and a bunch of nicely-bundled, well-done apps at http://www.portableapps.com. There's a multitude of other compatible apps at http://www.portablefreeware.com that are also free. And if John Haller's launcher isn't your style, there's PStart at http://www.pegtop.net/start/ as an alternative. Note that none of these solutions require adding an extra CD drive to my computer, a simple ini file will have them ask when I plug it in (note the asking) if I want to run it, and they are free. I have choice - I don't need to use either launcher if I don't want to, or if for some reason I wanted to, I could use a couple of them. Notepad++, Firefox, Gaim, OpenOffice.org/AbiWord, FileZilla, Gimp, Nvu...the list goes on of quality software that I can have portably without U3. Oh, by the way, SanDisk is my brand loyalty. All five of my flash drives that I've purchased have been SanDisk, and when I recently bought my first mp3 player, I went with a Sansa. I love all my flash drives. I grew out of the first one, and washed the second one three times before it gave out. With the third one, I dropped my computer on top of while it was plugged in, which cracked the casing open, bent the connector 45 degrees, and knocked the innards out of the casing. I bent the connector back, put the insides back in, and snapped the casing shut. It worked fine. My fourth one died inexplicably after a fairly short time, and I am working on seeing the possibilities of RMAing it. I just got a fifth, a 2GB one. As a poor college student, I generally just get the cheapest, but SanDisk is the exception because I trust you guys so much and have had such a good experience with you. But U3 is where my loyalty ends. It's not what's next, and it's not smart. It's stupid, badly designed, and will not remain on my flash drive after the first time I plug it in.
What's more, PortableApps works just fine under Wine. What more could I ask?
Tuesday, March 6, 2007
My first Vista experience, and I'm still waiting for the Wow
And, unsurprisingly, I wasn't Wowed. Or even pleased. First of all, it is slow. It's an HP Pavilion dv6000, as I read it off the label, with Vista Home Premium (whatever that means). At any rate, it's dual-core something or other. I would look up the details, but I'm currently uninstalling the trial of Norton (in favor of AVG) and running a virus scan, so it's really sluggish (as in frequently can't keep up with what I'm typing). I suppose that's acceptable, but definitely not Wowing.
Anyway, to the beginning. As the computer logged on, I was bombarded by Norton and Windows Security Center (or whatever they call it now), screaming at me to "fix" it, meaning buy Norton Internet Security. Little did it know, I was planning on fixing it in other ways. About a dozen security popups (probably an underestimation if anything) and pretty-bordered windows later, I had succesfully determined that a) Windows Updates needed to be installed and b) Norton wanted me to buy it.
So I promptly found my way to the Control Panel to uninstall Norton. I instinctively moused over to the Add and Remove Programs item, which I quickly discovered was no longer there. After some searching, I found something about programs and uninstalling, and another half-dozen security prompts later, managed to start Norton uninstalling. I say start, because it was taking a long time. Really long. In fact, it just finished, and I started typing this post well past the halfway mark. In the meantime, I downloaded and installed AVG, updated, and started a virus scan. Jolly good.
Well, AVG is installed and scanning happily, and Norton is waiting for a restart to give up the ghost. My work here is done. And my first experience with Vista?
Quite negative. It's kind of pretty, but not really. And it's slower than I think it should be for the computer it's on, as well as being generally obnoxious and unneccesary. Overall, pretty much what I had expected. Pardon me while I go and hug my Ubuntu.
Monday, January 15, 2007
Step 1: Backup, backup, backup!
Now, as I am planning on wiping my hard drive and reinstalling from scratch, the first step is backup. A lot. Last time, I ended up backing up my entire Windows partition (some 20-something GB) to 4 DVD's, with a little help from 7-zip and some file splitter, which proved to be unnecessary. So, after going through great lengths to reunite my file from 4 DVD's, using a Windows-only program, and save it to my Linux partition (Ext2 IFS was of incalculable help in this process, allowing me to access my linux partition from Windows), I decided to do it better this time around.
The first time, it was only after I had spent 24 hours straight compressing my files, and some more time splitting them, that I noticed that 7-zip had file-splitting built in - and it would work across operating systems. So this time, I took my reunited backup file (a 15GB 7z file), and zipped it using 7-zip, in "Store" mode for speed (compressing the already-compressed file wouldn't gain enough to matter anyway), with the option to split it into 4GB chunks. That worked great, and would work across operating systems.
So I went to burn my DVDs. And things went badly. The CD burner built into Nautilus (Windows Explorer of Gnome) refused to write at any speed other than 24x, and I only had 16x DVDs. So I found GnomeBaker. It allowed me to burn at slower speeds, but refused to add any files to my DVD project. After trying to get it to work, I relented, and installed k3b, which is built for KDE, but still works under Gnome, via Synaptic. And it was good. I definitely reccomend it, even if you're running Gnome like in my case. It worked flawlessly, and gave me all the options I would expect, in a very easy-to-use interface. It even gives me a little progress indicator on all four of my screens that I can switch through very fancily using Beryl. Really. Well, almost flawlessly. For some reason, it wouldn't let me add files over 4GB, which my files were (slightly). But no problem, I just re-zipped my backup, and split it into 2GB chunks. Problem solved.
As I type, the first DVD (of four) has finished burning, and the second is working on it. I set it to verify, but the first one didn't, and the person who decided that the spacebar should push the "OK" button, just like the enter key, should be slapped. Preferably with a smelly trout. Because it told me something, but I was typing, and so I spacebar-ed out of it. It gracefully said "Error!" and made a fun noise. After evaluating the situation, I realized it just hadn't validated - nothing too critical. I gathered that the box I OK'd out of had said to put the DVD back in so it could test it. So next time, I'll be more careful when I'm typing and burning at the same time. For now, I've got some burning to do yet.
Edgy Eft, here I come!
I really liked the release that I'm typing this on, Dapper Drake (or 6.06, if you're boring about it.) Not only did it have a cool name (ducks are way up there on my "best animals" list), but it's worked pretty darn well. And I've beat it to death, too.
So along comes this Edgy Eft. And I was excited, because efts are neck-and-neck with ducks on the aforementioned lists. For those of you who don't know (probably many; it would be interesting to look at the stats for the keyword "eft" at places like Google and Wikipedia after the announcement of 6.10), I'll enlighten you. Contrary to popular belief, efts are not in and of themselves a creature. They are a phase of development for the newt. You could analogize them to chicks, if you so desire - an animal, yes, but just a phase of a more general animal - the chicken.
According to Wikipedia, strangely enough, newts were originally (way back in the old days) called efts. But as the word progressed, it became euft (which I can only imagine pronouncing as if I had just been knocked off my feet, or kicked in the gut or something), then ewt. Then people got tired of trying to say "An ewt" and just decided to rename it "Newt" so they could just say "A newt". And after all that, we still call the littluns efts. This would be a good time for a picture:

But on to the actual matter on hand. I'm planning on installing this Edgy Eft, and since I've heard horror stories of upgrading, and it's always better to get a fresh start anyway, I'll be wiping my hard drive clean and starting from scratch. I will be keeping my blog updated with my adventure in doing so, perhaps from the school library as necessary. I learned a lot in my first time around, and messed a lot of things up. So this time around, I'm setting out to do it right. Or at least better.
Thursday, January 4, 2007
Ubuntu and my new Sansa
Unfortunately, most of my music is in OGG, and Sansa doesn't like OGG. So I had to convert it to mp3. After some quick googling, I came across SoundConverter - a very handy program to do (almost) exactly what I wanted it to do. If it's not in your package manager (under "soundconverter" - "soundconvert" is different, and not the right one), you can just download it. After unzipping, you can just run the soundconverter.py file - no compiling or installing necessary. After setting it up to preserve my filenames (I'll explain why later) and just put them in the same place, only mp3, I pointed it to my music folder and let it work. It took quite a while, especially since I kept interrupting it to restart.
It worked - almost beautifully. It didn't, however, recognize a lot of my tags (the song info that my Sansa uses to categorize my songs - very important). So I turned to another handy program (one you should have anyway) called EasyTag. It's a very handy utility to edit and assign tag info for any number of file formats. I think it should be in the package managers, if not, download it from the website. I simply pointed
it to my music folder, and it scanned the files, automatically filling in the tags from the file structure (which is why I told it to keep the mp3s in place). That was easy! I exited EasyTag, telling it to save the tags, and then simply did a search (Places->Search for files) for *.mp3 in my music folder. I selected all of the ones it found, dragged them onto my Sansa (in a "Music" folder, just for organization's sake), and it worked! Actually, I had to figure out that the trash (from all the OGGs I had tested) was still on the flash drive, and I had to delete it first - do see the trash folder (and other hidden folders), hit Ctrl-H. I was excited at how easy that was - not laborious like in a certain other OS.
I discovered another nifty thing during this process. I had noticed that when I moused over the sound files, the icon changed, and I thought nothing of it. But when I held my mouse over a sound file for a while, the song started playing! Amazing! Mouseover sounds = play sounds, without any player or clicking or any such nonsense - just that sound file, coming out my speakers. Beat that, Bill.