Restore Default Junctions

I recently changed my user name on Windows. Using some registry trickery I was also able to change my actual user folder. With the exception of a few programs that were using static pointers to my user folder (Dropbox), everything went well. But later I started getting errors from Windows Backup like this though.
Backup encountered a problem while backing up file C:\Users\ddaydj\Documents. Error:(The system cannot find the path specified. (0x80070003))
I was ignoring it for a while, but got tired of my backups having errors. After looking around my computer and doing some research, I realized my junctions that were created with the user profile, were still pointing at my old user folder (I did an article about junctions a while back). So I went ahead and made a script to go through and delete all the default junctions in my user folder and recreate them.

Below is the script I wrote. You can copy and paste it into notepad and save it as a .cmd file. It requires that you run it as an administrator, so if your user account is not an admin change the 3rd line where it says %USERPROFILE% to the path to your user folder (Example: C:\Users\ddaydj).

Edit: Well, I just learned a lot more about doing batch files. Below is an updated version of the script that should be significantly nicer to look at and easier to understand (not to mention 71% smaller). Also, if you want your My Games folder to redirect to Saved Games, remove the REM from line 17.
CALL :MKJUNCTION "\Application Data" "\AppData\Roaming"
CALL :MKJUNCTION "\Cookies" "\AppData\Roaming\Microsoft\Windows\Cookies"
CALL :MKJUNCTION "\Local Settings" "\AppData\Local"
CALL :MKJUNCTION "\My Documents" "\Documents"
CALL :MKJUNCTION "\NetHood" "\AppData\Roaming\Microsoft\Windows\Network Shortcuts"
CALL :MKJUNCTION "\PrintHood" "\AppData\Roaming\Microsoft\Windows\Printer Shortcuts"
CALL :MKJUNCTION "\Recent" "\AppData\Roaming\Microsoft\Windows\Recent"
CALL :MKJUNCTION "\SendTo" "\AppData\Roaming\Microsoft\Windows\SendTo"
CALL :MKJUNCTION "\Start Menu" "\AppData\Roaming\Microsoft\Windows\Start Menu"
CALL :MKJUNCTION "\Templates" "\AppData\Roaming\Microsoft\Windows\Templates"
CALL :MKJUNCTION "\AppData\Local\Application Data" "\AppData\Local"
CALL :MKJUNCTION "\AppData\Local\History" "\AppData\Local\Microsoft\Windows\History"
CALL :MKJUNCTION "\AppData\Local\Temporary Internet Files" "\AppData\Local\Microsoft\Windows\Temporary Internet Files"
REM CALL :MKJUNCTION "\Documents\My Games" "\Saved Games"
CALL :MKJUNCTION "\Documents\My Music" "\Music"
CALL :MKJUNCTION "\Documents\My Pictures" "\Pictures"
CALL :MKJUNCTION "\Documents\My Videos" "\Videos"
ICACLS "%MYUSERPROFILE%%~1" /deny *S-1-1-0:(RD)
Edit #2: Turns out this wasn't what was causing my problems Windows Backup. My registry modifications to migrate my profile were incomplete and I also needed to change all the entries here to point to the new folder, HKU\SID\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders. The script is still helpful for cleaning up junctions though.

HTTPS is less secure?

There's been a crazy trend with modern web browsers that I really think needs to be addressed.

Typically, when you're going to access a website it uses HTTP, which is not very secure. Everything going between you and the site can be easily seen by everyone. HTTPS encrypts your communcation with the site by using a certificate. Certificates on the sites that you visit are generated by a Certificate Authority (CA). Your computer comes built-in with a list of who all the CAs are and when you get a certificate for a website, it check that it was issued by someone your computer trusts.

In case you didn't guess, certificates from these places cost money. A common thing to do for connections that are only going to be used inside your network, or for smaller sites is to use a self-signed certificate. These certificates provide the same level of encryption that the ones from a CA do. The difference is your computer can't verify where it came from.

So my problem comes in with how modern browsers handle these self-signed certificates. When you go to a site with a self-signed certificate Internet Explorer, Firefox, and Chrome all hit you with a page warning you that the site you are about to connect to may be insecure. Even worse, the latest version of Firefox actually gives you the warning, but won't let you click through it and automatically stops you from visiting the page.

I understand the need to warn users that a site might not be using a certificate issued from a CA, but to treat it like its somehow less secure than going to a site without encryption is just crazy.

Automatically open a KeePass database

I'm not sure if this is a new feature or not, but I found a useful thing to do with KeePass. You can use command line switches to specify things like which database to open, and then give it the things it needs to open it, like your password and the location of the keyfile. Having KeePass launch automatically when I log on is very convenient for me. The issue with this is that the shortcut would end up having your database password in it for every who went poking around your computer to see. The latest version of KeePass has an option to encode a password using your Windows account so it will only work on that profile.

To set this up, make a new entry in KeePass for your master password. In the auto-type tab, change the default sequence to {PASSWORD_ENC}. Now, what I did was made a small batch file called keepass.cmd and placed it in my startup folder in the Start Menu. The contents of the file looked like this.

SET DATABASE="C:\path\to\Database.kdbx"
SET KEYFILE="C:\path\to\pwsafe.key"
START "" "C:\Program Files\KeePass Password Safe 2\KeePass.exe" %DATABASE% -keyfile:%KEYFILE% -pw-enc:%PASSWORD_ENC%
Put the full path to your database and keyfile in the quotes on the first and second line. For the 3rd line, use auto-type on your master password to add the encoded version of your password, it will be something insane like 350 characters long. Save the Batch file and you can now run it to automatically open your KeePass database. Because of the way the password is encode, it will only work on your current windows account, if you use multiple computers, you'll need to get the unique encoded password for each one and modify the batch file. I'm pretty sure this will only work with version 2.15 or later. Any questions or feedback is always welcome.

Mad Catz Pro Guitar as a 4-String Bass

I'm going to give the disclaimer up front that I really don't know much about instruments and I could be completely wrong about this. That being said, I figured out how to get the Mad Catz Pro Guitar to be used as a 4-string bass (using the top 4 strings) by changing sound font and tuning. After hooking up the guitar via MIDI and turning it on, press triangle 5 times to change the sound font to Accoustic Bass (you can press it a few more times other styles of bass) and then box once to tune it down. If my understanding of tuning is accurate, this should set the strings from top to bottom as E1, A1, D2, G2.
Output Monitor from MIDI-OX

Switching to a password manager

Its amazing the number of people I know who still use the same basic password for everything in their life. There have been a number of high profile security breaches in the last few months. If you had an account with any of the companies that was attacked every single account you have online is at risk. So I'd like to go over a few ways I have that you can start using unique passwords for everything you do and don't have to remember any of them.

The program I'm going to recommend is KeePass. Another popular one is LastPass but I have some concerns about using that one. KeePass will generate and manage passwords for anything you need. I have mine keeping track of passwords for websites, computers on my network, and even cd-keys for software I've purchased. KeePass saves all of your information in a database file which you can bring along with you to be able to access from outside your home. I'm not going to get into detail about how to use KeePass since there's some excellent guides on their site. I will go over some of the features that I think are important that might be overlooked.

Before setting up KeePass you need to figure out how you're going to access your passwords when you're not at home. The two ways that I recommend are; carry around keepass with your database on a flash drive, or sync your database to all the computers you use with DropBox.

KeePass + Flash Drive
If you're going this way, I recommend using KeePass 1.xx. It is much lighter-weight than 2.xx and doesn't require .Net which every computer might not have. You'll want to download the ZIP package and uncompress that to your flash drive. From there KeePass will work like a normal program but save all the settings on the flash drive instead of the local computer. With your database saved on there as well you'll be able to pull up your passwords on any Windows computer.

KeePass + DropBox
This is what I use and is better if have a set of computers that you always use. I recommend KeePass 2.xx for this method. The computers you'll be working on you'll have more control of so install feature rich programs should not be an issue. 2.xx also has a wonderful synchronize option when saving that makes sure you don't overwrite changes done on another computer. Use the installer to put KeePass 2.xx on the computers you use. Create your database and save it inside your DropBox folder.

One thing I strongly recommend you do if going this route is create your database a key file. This will be a small 64byte file that will be required in addition to a password to unlock your database. We're doing this because your database with all your passwords is going to be floating around online. If anyone were ever to get access to it they would be able to brute force their way into your database. By using a key file its like adding a second password that is 64 characters long, adding a huge layer of security. On home computers you can save this locally. For computers outside the safety of your home, I recommend carrying a copy of your key file on a flash drive that you'll need to plugin when unlocking the database.

Other Access Methods
While both of the above methods are fairly versatile, you might find times where you are without access to your passwords. The best solution that I have is to access KeePass using a phone app available for iOS, Android, and most other phones through J2ME. If you are using the flash drive method, you'll have to make sure to copy the latest version of your database to your phone when you make changes. If you're using DropBox, both iOS and Android have DropBox clients so you'll be able to pull the latest version of your database as long as you have internet access. You'll also need a copy of the key file on your phone if you're using this method, so keep that in mind.

A very important thing no matter which method you use is to keep a backup of your database. If you're using DropBox it will keep old versions of the file on record, but you'll still want to have a local backup just in case.

After you get comfortable with using KeePass, I recommend setting your passwords to expire after a preset amount of time. I have mine set to every 90 days. If a password expires, I won't worry about it until I go to use it. Then I'll use it one last time to log into the site, and change my password to a new one generated by KeePass. This creates a stagger so that you're not overwhelmed one day with all of your passwords being out of date.

Auto-Type is a wonderful feature where KeePass looks at the name of the window you're currently using and sends your password to that window. It requires a little bit of setup for each password, but if you give good names to your password entries it will do most of the work on its own. One thing I would recommend is change the default auto-type string to exclude {enter}. This will prevent your username and password from accidentally being sent if you are not in a place expecting you to log in.

I hope this helps. Feel free to leave any feedback or questions in the comments.

Why I'm Sticking with Chrome

This is in response to Why I’ve Switched From Chrome to Firefox 4 over at Lifehacker.

First off, all of the things they list I agree with and think a great features of Firefox 4, but here's why I'm not switching back.

Chrome continues to be the most secure browser on the market. This year's Pwn2Own only had two teams go up against Chrome and neither was able to use any exploits to gain access to the system. Chrome also packages a light-weight PDF reader and Adobe Flash Player with the browser. Adobe Reader and Flash Player have for many years now been one of the biggest security holes in user's computers. Security flaws are frequently found in both and while Adobe has been much better in recent years about pushing out updates in an timely manner, their auto-update still leaves much to be desired putting responsibility on the user to keep both up to date.

Which brings us to the way Chrome updates, you will never have to update Chrome. That isn't to say Chrome doesn't update, but it doesn't require any interaction from the user to do so. This means that you'll always have the latest version of the browser without having to check for an update and go through the process of installing it. This update will also come with the latest release of Flash so you won't have to be worry about updating that on its own.

I was amazed this feature wasn't in Firefox 4 but Chrome isolates all tabs, plugins, and add-ons in their own process. If Flash crashes for whatever reason (which still a thing), then the entire browser goes down with it. If this happens on Chrome, I just reload the tab and Flash is reloaded without affecting anything else.

Installing Add-ons
Firefox still requires you to restart the browser anytime you install an add-on or change the theme.

Overall, while Firefox is better by leaps and bounds compared to 3.5, when you compare it to Chrome and even Internet Explorer 9, I think it still feels like a dated browsing experience.

My Recent Gaming Endeavors

After almost two years of being on a limited budget my finances finally became stable late last year. With Christmas over with, I was able to pick up a lot of the games I had been wanting to play over that time. So I thought I'd share some of my thoughts on them.

Assassin's Creed Brotherhood
I have very mixed feelings about this one. Finishing Assassin's Creed II, I was done with Ezio, and really didn't want to see anything else with him. This outlook didn't change much playing through the game. In general the events of the game interesting in the grand scheme of the Assassin's Creed storyline, but on its own I found it rather dull. The gameplay made up for this though with dozens of distractions around the city to do and some very fun new ways to kill people. While stabbing dudes in the face is one of my favorite passtimes, summoning assassin's who appear out of nowhere to stab dudes in the face for me turned out to be even more satisfying. Its like you have a private army, following you around, hidden from even your view, ready to kill at a moments notice. Overall it was a fun game and a required playthrough if you are invested in the series.

Dragon Age: Origins
I have mentioned this many times before, but probably not here; I love Bioware's games but find them nearly unplayable. Every time I've played a Bioware game, I am mesmerized by their characters and story. What holds me back from enjoying them is gameplay that seems to require a level of research, planning, and micromanaging that I am not willing to give. Mass Effect has been the exception up to this point since it is essentially a 3rd person shooter. Dragon Age also had these issues for me but I was able to overcome them with a mod to respec my characters at essentially anytime and another that improved the game's AI scripting for your party. With the gameplay to a point that I could enjoy it, playing through Dragon Age was a wonderful experience. In all I ended up putting 75 hours into the game and I still have the expansion to go through. Mass Effect always gave you a good assortment of dialogue options so that you could either play your character as a the good samaritan or the heartless badass, but Dragon Age gives you more morally grey areas and different ways to approach them. With few exceptions, I was always given an option that felt exactly how I would respond to the situation and because of this I got a very personal experience out of interacting with the game's characters and shaping the story.

This game is crazy in all the ways I want a crazy Japanese game to be. I won't try to describe how insane the game gets because there's no way I'll do it justice. But one thing I can say is that game ends 5 times! It ends, then you play an epilogue, and it ends again, the credits roll, then you play some more, credits roll again! ... and then there's more! Great character action game, with a wonderful "easy" option that lets you mash on one button and the game will automatically choose a combo or move that is appropriate for the situation. I ended up using this for the later half of the game since I was more interested in seeing what insane thing would happen next than any challenges from gameplay. I will be going back to this one after I'm caught up with my backlog to finish it on normal and tackle the huge amount of unlocks this game has.

Red Dead Redemption
Finished this one last night. Its really interesting to see how Rockstar's game progress from one game to the next. In many ways this game is Grand Theft Auto IV with cowboys. Gameplay-wise, I think that is very true with the aiming and cover system feeling very much the same. The main missions seemed to tie together a lot better though and always seemed to be moving towards the main story in one way or another. While the story was good, the game's main character, John Marston was by far my favorite aspect of the game. He falls into the same situation as many of Rockstar's other protagonists of someone trying to escape their past. Unlike all the previous incarnations, he seems to fight it every step of the way and never accepts. Despite the things he's done in his past, he comes across as an honest and morally sound. I think the best example of this is when you run into a prostitute (a staple of Rockstar games) instead of being present with an option to hire them, the character simply says "Thank you ma'am, but I have a wife." Sadly, I found the last few hours of the game quite disappointing, but won't go into details.

Alan Wake
Started this last night and got done with the first episode (chapter). My initial impressions are quite bad. While I'm mainly playing it for story and atmosphere and those have been good so far, other parts of the game have not been enjoyable. I find the controls unintuitive, specifically with the rather vital button for run and dodge being the left bumper. Second, I don't think the game looks good at all. Motion blur is in full effect and enemies are covered in a dark haze, so its usually possible to just overlook. The game is also full of pre-rendered video which is noticeably compressed and seem to be there only because the textures on the game engine are high enough to show off the Verizon logo on Alan Wake's phone.

And that's it for notable games I've played the last few months. After Alan Wake I still have Infamous and Dragon Age: Awakening to take care of so maybe I'll check in with feedback on those. One thing I did notice when I was playing through these is I wasn't really interested in the challenge the games were trying to give and was more interested in the experience they gave from start to finish. Not sure if this has anything to do with me being older or my taste in games changing. I have put about a dozen hours into Super Meat Boy, so...