Hi! Welcome to Angry Cat Productions. If you have any questions about any of my posts, comment, and I'll do my best to help in a timely fashion (usually quite quickly.) If you have any other questions, feel free to comment on whatever post you want, and I'll take a stab at helping you out. And if something on this site helps you solve your problems, please let me know in a comment. Because like the rest of the world, I like warm fuzzy feelings. Enjoy!

Angry Cat Productions

Thursday, October 25, 2007

Of MainMenus, MenuStrips, and Visual Basic 2005

So today in class, we were doing a simple introduction to menus. My book said to add a MainMenu control to my form, which I had to conjure up from right-clicking on the toolbox and finding it in "Choose Items". The MainMenu control is distinctly different from the MenuStrip control - the MenuStrip is all new and has the fancy blue strip down the side, the MainMenu is decidedly more compact and old-fashioned (think Office 2000 vs Office 2003/XP). And my book said to use MainMenu. So I did, and I created my menu, and it was beautiful. And then I went to run it, and my menu disappeared. And no matter where I looked, or how hard I tried, I couldn't get my MainMenu to attach itself to my form. A MenuStrip showed up just fine, but the MainMenu refused to work. I tried adding new MainMenus and they didn't work. And I wanted to fix it. So I asked my neighbor, and it turns out his book (same edition, same ISBN) told him to use MenuStrip. Well isn't that just peachy. He tried his best, but to no avail. Finally, out of desperation, I right-clicked on the menu in the little tray below the form, selected "Cut", and then pasted it back in. And it worked.
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 09, 2007

An Animated Gif for the Tango Throbber

So I've recently been using the Tango Icon Gallery, and have been very pleased with the stuff available there. But one thing that bugged me was that the throbber wasn't available in animated gif form. And I googled it briefly, but couldn't find it there either.

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.


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.

Labels: , , , , ,

Monday, July 09, 2007

Moving or Changing your Documents and Settings and Program Files directories to a different partition on Windows XP

Otherwise known as "The next installment of my installation saga, tuned to search engine hits".

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:

  1. Login as administrator
  2. 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.
  3. 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.
  4. Log out of Administrator
  5. Log in as temp
  6. 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.
  7. 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
    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.
  8. 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.
    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.
  10. 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).
  11. 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.
  12. 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.
  13. 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.
  14. 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.

Sunday, July 08, 2007

I'm tired, I think I'm going to go program now.

I was going to write about trying to map Documents and Settings and Program Files to my D:\ drive, but I realized that I'm not in a posting mood, and the last two posts were excruciatingly boring. So, good night. I'm gonna go hack at some code.

Installing Windows (definitely not the energy-efficient kind)

After making sure my data was securely backed up, time for Windows. I was ready to see how a fresh Windows install stacked up with a fresh Linux install, since Windows usually comes preinstalled and perfect. So I popped my Windows XP Pro disc in and booted up. Okay, I admit, I've installed Windows from scratch numerous times before...but for the story's sake, we'll pretend I haven't.

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

So I finally got around to actually redoing my entire computer from scratch. The first step, of course was backup, which I'll cover in this post.

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 06, 2007

Why I hate U3

Yesterday I got a new flash drive - they were on sale at OfficeMax, and I needed one. So of course I got a SanDisk Cruzer, because I love them. But I also had to get the u3 removal software (http://www.u3.com/uninstall/) so that I could rid myself of the grossly unnecessary u3. In their little survey for reasons I was removing it, they didn't have the "I hate U3 and think it's the stupidest idea in the history of flash drives" option. So, I wrote them a little note in the "Other" section, and this is how it went:
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 over at Portable Apps. There's a multitude of other compatible apps at Portable Freeware that are also free. And if John Haller's launcher isn't your style, there's PStart 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 06, 2007

My first Vista experience, and I'm still waiting for the Wow

Being a CS/EE major, I'm often asked to look at the computers of various friends and classmates, and yesterday was no exception. So tonight I stopped by to check out my friend's friend's computer, and lo and behold, it's got Vista. So I was inadvertently plunged into my first Vista experience.
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!

So, here is the first of the series of posts chronicling my adventure of installing Edgy Eft and Windows XP as a dual-boot system on my Acer Aspire 1640 laptop. I specifically ensured that my machine would have plenty of hard drive space, as I anticipated dual-booting, so I've got 160GB to play with - not too shabby for a notebook.

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.

Labels: , , , , ,

Edgy Eft, here I come!

A long time ago, news came out that Ubuntu 6.10 had come out. As a sidenote, "6.10" means it was released in October of 2006 - 6/10. It doesn't mean it's version 6, sub-version 10. In case you were wondering. And this release was nicknamed "Edgy Eft" in keeping with Ubuntu's tradition of assigning each release some cute name involving some kind of animal paired with an adjective, both with the same letter. As this is their 5th release, it gets the 5th letter, E.

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:I thank the people at butterflybarn for this picture, I doubt they'll mind the trickle of people visiting my blog using their bandwidth. If you're from butterflybarn and don't like it, let me know. Anyway, as you can see, they look kind of like miniature dinosaurs. I like them.

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.

Labels: , ,