Changes in registry startup key between Windows XP and Windows 7

Several days ago I had an issue reported where one of my applications was causing a strange folder to open when the user logged in to their computer.  My application is supposed to auto-start when the user logs in to their computer, but it was never starting on these computers – only opening a strange folder.  After doing some testing, I discovered this was happening on Windows XP machines, but not Windows 7 (and presumably Windows Vista).  I did some research and discovered that Windows XP and Windows 7 interprets paths slightly differently from the HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run registry key.

Continue reading “Changes in registry startup key between Windows XP and Windows 7”

ProjectConfigSync Project on GitHub

I’ve created a small project which parses .SLN and .CSPROJ files and allows you to compare and merge project settings across multiple configurations.

This has been a very handy tool for me.  We have a Solution here at work that has about 25 projects, and often times we’ll have an ANY CPU platform configured to build for X86 in one project, but configured to build for ANY CPU in another configuration.  This lets me quickly identify where bad misaligned configurations exist in my project files.

I haven’t yet published a setup project, but I have checked in the binaries under the bindebug folder.  Please feel free to post any bugs or feature requests.

The Git repository is located at:
https://github.com/aplocher/BitCollectors.ProjectConfigSync

Installing Windows 7 on an HP p2-1334 Desktop PC

I had so much trouble getting Windows 7 to load on the HP p2-1334 Desktop PC.  The only OS option it comes with is Windows 8, which I actually like quite a bit, but it’s for one of the staff I work with and I didn’t feel like training them on it – plus it wasn’t the Pro edition so I couldn’t join it to the domain without upgrading.

I decided it might be nice to throw together a small tutorial on loading Windows 7, and hopefully help at least one poor soul out there. I’ve also read complaints about not being able to change the boot priority (despite the fact that this is an option in the BIOS), which I will also address here.

Continue reading “Installing Windows 7 on an HP p2-1334 Desktop PC”

SGEN: An attempt was made to load an assembly with an incorrect format (TFS 2010)

While I was setting up a new build server, I ran into a problem where I would receive the error “SGEN: An attempt was made to load an assembly with an incorrect format” when it would attempt to build my solution.  It turns out it has to do with the fact that my solution contains mixed platform projects, even though I had my Configuration (in the Build Definition) set to Mixed Platforms|Release.

Several suggestions were made on the MSDN forums and Stack Overflow that didn’t make the error go away.  I finally found a solution thanks to a user named wesen on the MSDN forums: see the post here.

Basically the build process is running the 64bit version of sgen.exe, which works great for X64/AnyCpu projects, but if you have a project set for X86 you’re out of luck.  To force it to call the X86 sgen.exe (which still seems to be ok for the AnyCpu assemblies) you will need to set the Tools Version to X86.  You can do that by following these steps:

  1. In Team Explorer, right click on your Build Definition and choose Open Process File Location
  2. Double click on the XAML file that is selected
  3. In the designer, select the container called Sequence (this is the top-level container that goes around everything else).
  4. In the Arguments list (typically at the bottom), change MSBuildPlatform from Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.Auto to Microsoft.TeamFoundation.Build.Workflow.Activities.ToolPlatform.X86.
  5. Save and close the file.
  6. Check the file back in to TFS and try your build again.

This solution did the trick!  My builds are now working exactly as I expect them to.

Another suggestion I saw (which didn’t help me at all), was to disable the project from creating a serialization assembly.  Follow these steps to do that (it may or may not help, but it’s worth a try):

  1. In Solution Explorer, right click on the project that has the error and go to Properties.
  2. In the Build tab, scroll to the very bottom and change Generate Serialization Assembly to Off

Good luck!

Bing Maps with JavaScript and Windows 8

I was having some trouble finding any good information on how to implement the final build of Bing Maps (v1.1.20120927.0) into a WinJS Windows Store application.  It’s actually pretty simple.

Start by downloading and installing the Bing Maps SDK from:
http://visualstudiogallery.msdn.microsoft.com/bb764f67-6b2c-4e14-b2d3-17477ae1eaca

In Solution Explorer, right click on References and add a reference to “Bing Maps for JavaScript”

Add the following script tag to the top of your HTML file:

And add a DIV tag to the HTML which will contain the map:

Now add the following JavaScript code to your JavaScript file:

Add this JavaScript to your onactivated or ready events in the JavaScript file:

 

Hide Welcome Screen Users posted to GitHub

If anyone has a suggestion for a better name than “Hide Welcome Screen Users” please feel free to drop me a line :).

Basically it’s just a very small tool written in C#/.NET that allows you to hide users from the Welcome Screen in Windows Vista, Windows 7, Windows Server 2008, and Windows Server 2008 R2.  I needed to create several users that performed system tasks, and it was annoying to see them on my Welcome Screen every time I booted up.  There’s an easy way in the registry to prevent specific users from showing up there, so this tool is basically just a small tool that edits those registry keys.

It’s checked in at: https://github.com/aplocher/Welcome-Screen-Hide-Users.  Please let me know if you find any issues with it.

Quest for Glory Character Editor

I’ve uploaded the C# source code for my Quest for Glory Character Editor.  Currently it only supports editing or creating characters from QFG1, but I’m very close to finishing up support for QFG2.  It took some work to reverse engineer some of the checksums that are generated, but the support for QFG1 is pretty solid and I’m very happy with the progress I’m making with QFG2 (QFG2 code isn’t yet checked in).

Please let me know if you find any issues or wish to contribute to the code.  In particular, I could definitely use some help with support for QFG3 and 4.

I will package up a setup file for it eventually, but for now the code and compiled exe are available at: https://github.com/aplocher/BitCollectors.QfgCharacterEditor.  If you plan on downloading the exe, I believe I’m targeting .NET4 (Client Profile should work).

I will also be providing an ASP.NET version eventually, so you can make edits or create a new character without ever needing to install anything.

QFG Character Editor - Screenshot

Update (02-14-2013): Updated GitHub URL to new repository name.

Update (05-17-2013): QFG character editor web app is online at: qfg.bitcollectors.com.  See blog post about it: here.  Also, watch for an update very soon with QFG2 support.  The code is checked in to GitHub and works but I’m trying to wrap up a couple other features, such as the ability to edit your gold inventory.  I will update the web app and have a setup file available when it’s ready.  I will keep you posted!

Update (06.14.2013): QFG2 character support has been added and the setup file is available now.  Please see my latest post at: HERE.

Update (11.19.2013): there is now an official project page for this application.  To keep up to date on the latest releases, please check out www.bitcollectors.com/Project/QfgCharacterEditor